Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO with Parameterized Views?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00494019
Message ID:
00494267
Views:
25
>>Is there a way to pass nPKValue to the view through ADO?
>
>I knew I had sample code floating around somewhere:
LOCAL oConn as "adodb.connection"
>LOCAL oCmd as "adodb.command"
>LOCAL oRs as "adodb.recordset"
>
>oConn = CREATEOBJECT("adodb.connection")
>oConn.ConnectionString = 'Provider=VFPOLEDB.1;Data Source=C:\FOXTEST\testdbc.dbc;Password="";Collating Sequence=MACHINE'
>oConn.Open
>oCmd = CREATEOBJECT("adodb.command")
>oCmd.ActiveConnection=oConn
>
>*-- Could do it this way, too, and not pass params to Execute method.
>*--	oParam = oCmd.CreateParameter("?Cust_ID", 129, 1, 5, "ALFKI")
>*--	oCmd.Parameters.Append(oParam)
>
>oCmd.CommandText = "USE VIEW1"
>oRS = oCmd.Execute(null,"?Cust_ID")
Should that read?
oRS = oCmd.Execute(null,"ALFKI")
If not, I'm a little (or a lot<g>) confused. Where does the value of ?Cust_ID get set?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform