-
VB with FoxPro as BackEnd, Help Me Please!!
Hi All,
I am an average VB programmer and i hv to work for the first time with FoxPro
as a backend and VB as frontend.
I dont even know how i will connect to Foxpro through VB.
Please suggent me some good website links and examples.
Any help will be greatly appreciated.
Waitingly
Sandra
-
Re: VB with FoxPro as BackEnd, Help Me Please!!
"Sandra" <sandraibison@hotmail.com> wrote in message
news:3b8d4700$1@news.devx.com...
> I am an average VB programmer and i hv to work for the first time with
FoxPro
> as a backend and VB as frontend.
> I dont even know how i will connect to Foxpro through VB.
Here's a sample connection. The variable gsSBTDataPath points to the disk
directory that the DBF files are contained in. You connect to the directory
and open your DBF files as recordsets. This particular routine reads in a
list of part numbers from the parts master file and loads the part numbers
into a combobox control
'Load the Part Numbers from the SBT Items database
Dim dbb As ADODB.Connection
Dim rs As ADODB.Recordset
cboDesc.RemoveAll
Set dbb = New ADODB.Connection
dbb.Open "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=" & gsSBTDataPath & ";Exclusive=No;"
Set rs = New ADODB.Recordset
rs.Open "select item, itmdesc from icitem22 order by item;", dbb,
adOpenDynamic, adLockReadOnly
With rs
If .RecordCount <> 0 Then
.MoveFirst
Do While Not .EOF
cboDesc.AddItem Trim(rs.Fields("item")) & vbTab &
Trim(rs.Fields("itmdesc"))
.MoveNext
Loop
End If
.Close
End With
Set rs = Nothing
dbb.Close
Set dbb = Nothing
--
------------------------------------------------------------------------
George Shubin Custom Software Development
DX Software Systems Database Applications
Ph: 503-981-6806 Fax: 503-982-0120
www.dxonline.com dx@dxonline.com
------------------------------------------------------------------------
-
Re: VB with FoxPro as BackEnd, Help Me Please!!
Hi George,
Thanks a lot for your time.
I really appreciate your kind and timely help.
Regards.
Sandra
"George Shubin" <dx@dxonline.com> wrote:
>
>"Sandra" <sandraibison@hotmail.com> wrote in message
>news:3b8d4700$1@news.devx.com...
>> I am an average VB programmer and i hv to work for the first time with
>FoxPro
>> as a backend and VB as frontend.
>> I dont even know how i will connect to Foxpro through VB.
>
>Here's a sample connection. The variable gsSBTDataPath points to the disk
>directory that the DBF files are contained in. You connect to the directory
>and open your DBF files as recordsets. This particular routine reads in
a
>list of part numbers from the parts master file and loads the part numbers
>into a combobox control
>
> 'Load the Part Numbers from the SBT Items database
> Dim dbb As ADODB.Connection
> Dim rs As ADODB.Recordset
> cboDesc.RemoveAll
> Set dbb = New ADODB.Connection
> dbb.Open "Driver={Microsoft Visual FoxPro
>Driver};SourceType=DBF;SourceDB=" & gsSBTDataPath & ";Exclusive=No;"
> Set rs = New ADODB.Recordset
> rs.Open "select item, itmdesc from icitem22 order by item;", dbb,
>adOpenDynamic, adLockReadOnly
> With rs
> If .RecordCount <> 0 Then
> .MoveFirst
> Do While Not .EOF
> cboDesc.AddItem Trim(rs.Fields("item")) & vbTab &
>Trim(rs.Fields("itmdesc"))
> .MoveNext
> Loop
> End If
> .Close
> End With
> Set rs = Nothing
> dbb.Close
> Set dbb = Nothing
>
>
>--
>------------------------------------------------------------------------
>George Shubin Custom Software Development
>DX Software Systems Database Applications
>Ph: 503-981-6806 Fax: 503-982-0120
>www.dxonline.com dx@dxonline.com
>------------------------------------------------------------------------
>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks