CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2000
    Location
    Pune, India
    Posts
    34

    How can i specify...

    How can i specify Language Driver Information to a data source name. Can i pass that along with my connection string?

    Thanks in advance

    Initiative is to success what a lighted match is to a candle...

  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: How can i specify...

    If you mean like telling ADO which driver or provider to use, you can use the following:

    'for use with an Access database
    Dim s as string
    Dim cn as ADODB.Connection

    s = "Provider=MSDASQL;Driver=(Microsoft Access Driver {*.mdb});"
    s = s & "DBQ=" & App.Path & "\settings.mdb;"
    'or for SQL Server:
    s = "Provider=SQLOLEDB;Driver={SQL Server Driver};Server=YourServer;..."
    'or for Oracle: s = "Provider=MSORASQL"
    '(i dont know the driver for that one but im pretty sure the provider is something like that)

    set cn = new ADODB.Connection
    cn.ConnectionString = s
    cn.Open

    ...




    I have opened connections only specifying a provider, or only a driver or sometimes both. it really depends on the database type for which parameters are neccessary.

    Hope that helped,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Join Date
    Feb 2000
    Location
    Pune, India
    Posts
    34

    Re: How can i specify...

    Hi,
    Actually i wanted to know whether i can specify the Language related information in the dsn entry. I am getting strange errors when i try to populate my recordset with values from the client database. The client database contains some characters like ü,õ, etc. The clients database is, i think, in German. While saving records with these values to my database it is giving me error like `Error string concatination, numeric overflow and bla bla`. I am using ODBC DRIVER FOR INTERBASE BY INTERSOLV.

    Thanks in advance.

    Initiative is to success what a lighted match is to a candle...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured