Controlling Visual FoxPro 6 with VB6
Ahoy!
I just want to ask, is it possible to control a Visual FoxPro 6 database using Visual Basic 6? Like adding, deleting, and/or editing records in a VFP database.
I’m working on an identification system (barcode, biometrics, etc.) and I wanted to have a VB front-end with a VFP database back-end.
Thanks a lot!
Ric
Re: Controlling Visual FoxPro 6 with VB6
Re: Controlling Visual FoxPro 6 with VB6
Welcome to VBF!
Yes, VB6.0 could handle Foxpro database also, do you know how to use sql statements?
Re: Controlling Visual FoxPro 6 with VB6
Hi,
Can you give me an example on how to use VFP database in VB6? It would be a great help for me. Thanks! :)
Re: Controlling Visual FoxPro 6 with VB6
this is one of the method to open vfp database
VB Code:
Dim cnn As New ADODB.Connection
cnn.Open "Provider=vfpoledb;" & "Data Source=.\DatabaseName.dbc;"
Re: Controlling Visual FoxPro 6 with VB6
Thanks...I add Adodc1 and got no errors found but how can I open the database and see it using dbgrid? or any component to be used for viewing and editing the database?
Thanks for your time and support. :)
Re: Controlling Visual FoxPro 6 with VB6
you need to bind the datagrid (not dbgrid) to the adodc1 by setting the datagrid's properties.
DataSource = Adodc1 and right click on the datagrid, select Retrieve Fields option from the popup menu.
Re: Controlling Visual FoxPro 6 with VB6
hi there,
Thanks for your time..can I send you the file? I really can't do it. Maybe I'm not that good in vb. please help.
Thanks.