CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: Query

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

    Query

    Hi,
    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...

  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Query

    I suggest you set the following switch in your DSN:
    OEMTOANSI=YES


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

    Re: Query

    No it is also not working. I am getting the same error. I will just quote my connection string:

    with cnn#########
    .Provider = "MSDASQL.1"
    .ConnectionTimeout = 33
    .ConnectionString = "DSN=" & strDsn & ";uid=***;PWD=****;OEMTOANSI=YES"
    .CursorLocation = adUseClient
    .Open
    End With






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

  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: Query

    OEMTOANSI is NOT part of your connection string but an element of the DSN definition in control panel


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

    Re: Query

    Hi,

    But i cannot see any such option in my control panel/32 bit Odbc Data Source Administrator. I searched thru the driver-specific data source setup dialog box for my data source.





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

  6. #6
    Join Date
    May 1999
    Posts
    3,332

    Re: Query

    I'm afraid I can't help you, because I work on a German NT PC. All ODBC Control panel settings are in German. I can see the parameter, but I have no idea what it looks like in an English installation.


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

    Re: Query

    Hi,

    Can u just tell me where this option is found in your pc. Is it in the main window or inside a specific driver setup dialog box?



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

  8. #8
    Join Date
    May 1999
    Posts
    3,332

    Re: Query

    I start ODBC settings from Control panel, select a DSN and hit Configuration. Then, it's on the fourth step of the configuration wizard.
    But, be aware that this might look very different on another machine, depending on the version of MDAC, or ODBC.
    I'm out a here for today, see you tomorrow...


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

    Re: Query

    There is a parameter in the connection string called Auto-Translate that functions as the translator you are looking for. Use this instead of OEMTOANSI...


    with cnn
    .Provider = "MSDASQL.1"
    .ConnectionTimeout = 33
    .ConnectionString = "DSN=" & strDsn & ";uid=***;PWD=****;Auto-Translate=true;"
    .CursorLocation = adUseClient
    .Open
    End With




    Try that.

    Hope that helps,
    John

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

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

    Re: Query

    Hi,
    I tried giving Auto-Translate option but it is giving an error - `Error parsing connect string at offset 39`. This error is thrown by the ODBC Driver for Interbase.



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

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

    Re: Query

    Hi,
    I myself found out the bug out of my application. This error was b'cuz of the odbc driver. The driver was not really translating the data. I imported my database to Access from interbase and tried my program and it works. So i have contacted Borland for the fix.

    Thank u very much for all ur valuable suggestions.

    Bye

    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