Gostaria de saber se alguém pode me passar um script de como chamar uma procedure no Asp com banco de dados MySQL.
Grato.

Asp X Mysql
Started By SANDRO LOPES, 01/06/2007, 01:42
1 reply to this topic
#1
Posted 01/06/2007, 01:42
#2
Posted 26/06/2007, 16:29
<!--#include file="conexao.asp"-->
<%
Dim Cmd
Dim Nome
Dim Fone
Dim Mail
Nome = Request.Form("txtnome")
Fone = Request.Form("txtfone")
Mail = Request.Form("txtmail")
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandType = 4
Cmd.CommandText = "sp_inserir_dados" 'nome da procedure
Cmd.ParameteRs.Refresh
Cmd.ParameteRs("@nome") = Nome 'parametros da procedure
Cmd.ParameteRs("@tel") = Fone
Cmd.ParameteRs("@mail") = Mail
Cmd.Execute
Set Cmd = nothing
%>
<%
Dim Cmd
Dim Nome
Dim Fone
Dim Mail
Nome = Request.Form("txtnome")
Fone = Request.Form("txtfone")
Mail = Request.Form("txtmail")
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandType = 4
Cmd.CommandText = "sp_inserir_dados" 'nome da procedure
Cmd.ParameteRs.Refresh
Cmd.ParameteRs("@nome") = Nome 'parametros da procedure
Cmd.ParameteRs("@tel") = Fone
Cmd.ParameteRs("@mail") = Mail
Cmd.Execute
Set Cmd = nothing
%>
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)