Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple question on ADO usage
Message
 
 
To
23/08/2000 21:50:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00408085
Message ID:
00408838
Views:
13
>However, didn't Microsoft encourage us to use ADO ?

If you're using VB, or accessing non-VFP data, yes. But when it comes to using native Fox data, would you rather do:
oCat = CREATEOBJECT("adox.catalog")
oConn = CREATEOBJECT("adodb.connection")
oTable = CREATEOBJECT("adox.table")
oConn.ConnectionString = "Provider=Vfpoledb.vfpoledb;Data Source=.\TestDBC.dbc"
oConn.Open 
oCat.ActiveConnection = oConn

oTable.Columns.Append("Col_int", 3)
oTable.Columns.Append("Col_char", 129)
oTable.Name = "TestTable2"

oCat.Tables.Append(oTable)
or:
Create Database TestDBC
Create Table testtable2 (col_int i(4), col_char c(10))
In addition, you've still got the problem of binding the ADO recordset to, say, a grid or a textbox. Yes, it can be done, and I've even written a sample that shows the basics on how to do this (primarily for use with RDS and ActiveX Docs; works with ADO, though). But unless one has a compelling reason to do otherwise, I'd stick with using the native Fox data language, if for no other reason than it's less of a pain in the butt.
Mike Stewart
Previous
Reply
Map
View

Click here to load this message in the networking platform