Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEDB and Version
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00739784
Message ID:
00752274
Vues:
28
Here it goes:
oCn = Create("ADODB.Connection")
oCat = Create("ADOX.Catalog")
oCn.Open("Provider=VFPOLEDB.1;Data Source=c:\temp\mydbc.dbc")
oCat.ActiveConnection = oCn

? "Procedures: " + Transform(oCat.Procedures.Count)
For x=0 To oCat.Procedures.Count - 1
	? oCat.Procedures(x).Name
Next
You can also show tables, views, etc. with ADOX. The stored procedure text can be retrieved with Procedures(Index).Command.CommandText. HTH

>Hmm.... Can you show the code you used to list the SP's?
>
>Thanks.
>
>
>>Hi Steve,
>>
>>2) Just tested with released VFP8, it can read the list of stored procedures but the parameters cannot be retrieved. At least not using the Parameters.Refresh on the command object.
>>
>>A probable workaround is to read the entire stored procedure code with the CommandText property and then parsing to obtain the parameters. Although it wouldn't do you any good if you still can't specify parameters when calling the stored procedure.
>>
>>HTH,
>>
>>>Two-part follow up Q:
>>>
>>>1. What is the proper way to check the build number from a COM environment (eg., VBScript) and from a .NET environment (ADO.NET, C#)?
>>>
>>>2. With MSSQL, it's possible to discover Stored Procedure parameters and then create them with code and jam them into the SP. With the VFP8 OLEDB driver, is this possible? I think I'd want to interrogate the SP and then get all the column names into a System.Data.OleDb.OleDbParameterCollection or System.Data.OleDb.OleDbParameter, so I can then pass them back to VFP. Or is it possible to get all the column names from a VFP table so I could then create my own SQL-Insert string to pass to the provider?
>>>
>>>Thanks.
>>>
>>>
>>>>>Are you guys planning on updating the version number (eg "VFPOLEDB.1b") for 8.0, or is there another way I should check the driver version before my code uses it?
>>>>
>>>>No plans that I'm aware of. You can always check the build number.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform