Connection String


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Connection String

  1. #1
    Duane Snelling Guest

    Connection String


    How would I connect to a Paradox Database? Right now I am using ADO to store
    my information in Access, but I will have to be able to load some data into
    a Paradox database.

    Can someone help me out. I am not sure what the connection string will be.

    Thanks in advance.

    Duane...

  2. #2
    Paul Clement Guest

    Re: Connection String

    On 12 Mar 2002 13:34:22 -0800, "Duane Snelling" <duane.snelling@sympatico.ca> wrote:


    How would I connect to a Paradox Database? Right now I am using ADO to store
    my information in Access, but I will have to be able to load some data into
    a Paradox database.

    Can someone help me out. I am not sure what the connection string will be.

    Thanks in advance.

    Duane...

    Try the following (the database file is Customer and the location is the path in the connection
    string):

    Sub ADOOpenParadoxDatabase()

    Dim cnn As New ADODB.Connection
    Dim rst As New ADODB.Recordset

    cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Program Files\Microsoft
    Office\Office;Extended Properties=Paradox 5.x;"

    rst.Open "Select * from Customer", cnn, adOpenForwardOnly, adLockReadOnly

    '...

    rst.Close

    cnn.Close

    End Sub


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  3. #3
    sheir Guest

    Re: Connection String


    I tend to use the .udl file for my connection string.
    Such as something lik ....

    'build the connection string
    strCnnString = "File Name=" & app.Path & "\" & "dbconnect.udl"

    'create connection object
    Set m_cnnServer = New ADODB.Connection


    'set the connection string
    With m_cnnServer
    .ConnectionString = strCnnString
    .CursorLocation = adUseClient
    End With 'm_cnnServer


    Enjoy
    Sheir


    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
    >On 12 Mar 2002 13:34:22 -0800, "Duane Snelling" <duane.snelling@sympatico.ca>

    wrote:
    >
    >
    > How would I connect to a Paradox Database? Right now I am using ADO to

    store
    > my information in Access, but I will have to be able to load some data

    into
    > a Paradox database.
    >
    > Can someone help me out. I am not sure what the connection string will

    be.
    >
    > Thanks in advance.
    >
    > Duane...
    >
    >Try the following (the database file is Customer and the location is the

    path in the
    >connection
    >string):
    >
    >Sub ADOOpenParadoxDatabase()
    >
    > Dim cnn As New ADODB.Connection
    > Dim rst As New ADODB.Recordset
    >
    > cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Program Files\Microsoft
    >Office\Office;Extended Properties=Paradox 5.x;"
    >
    > rst.Open "Select * from Customer", cnn, adOpenForwardOnly, adLockReadOnly
    >
    > '...
    >
    > rst.Close
    >
    > cnn.Close
    >
    >End Sub
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)



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