VB with FoxPro as BackEnd, Help Me Please!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: VB with FoxPro as BackEnd, Help Me Please!!

  1. #1
    Sandra Guest

    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

  2. #2
    George Shubin Guest

    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
    ------------------------------------------------------------------------




  3. #3
    Sandra Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center