Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Como especificar o nome de um parâmetro na consulta ?
Message
From
17/10/2004 21:05:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Como especificar o nome de um parâmetro na consulta ?
Miscellaneous
Thread ID:
00952169
Message ID:
00952169
Views:
54
Pessoal,

Como posso especificar o nome do parâmetro nesta linha?
"Select * from Customers where CustomerID = ?pTeste"

-------------
Veja o código de exemplo abaixo:

lcConString = "Provider=SQLOLEDB.1; Persist Security Info=False; User ID=sa; Password=password; Initial Catalog=NorthWind; Data Source=Baferge"
loCon = CreateObject("ADODB.Connection")
loCon.Open(lcConString)
************************************************************************
loCmd = CreateObject("ADODB.Command")
loParam = loCmd.CreateParameter("pTeste", 129, 3, 15, "ALFKI")
loCmd.Parameters.Append(loParam)
loCmd.ActiveConnection = loCon
loCmd.CommandText = "Select * from Customers where CustomerID = ?pTeste" && Como informar o nome do parâmetro aqui ?
************************************************************************
* loRS = loCon.Execute("Select * from Customers", )
loRS = loCmd.Execute()
************************************************************************
DO WHILE !loRS.EOF
?loRS.Fields("CustomerID").Value
loRS.MoveNext
EndDo
Next
Reply
Map
View

Click here to load this message in the networking platform