Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2012
    Posts
    5

    Unanswered: Connecting to server using VBScript

    Hi,

    I want to connect to a SQL Anywhere server so that I can call a stored procedure (with input parameters).

    I wrote some code to establish the connection, but I kept getting an "Architecture mismatch between driver and application" error. The ODBC driver and the server are both 32-bit, so I'm not sure where the problem is.

    Any suggestions for what I should be checking?

    Thanks in advance!

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm having to guess at many details that you haven't provided, so I might be WAY off base. The error message makes me think that the Visual Basic memory model (probably x86 apartment) doesn't match the software driver (possibly x64), and there's no thunk to handle the conflict between them.

    If you can provide more information, I can give you a more accurate assesment of your problem and probably a relatively quick solution. Based on what you've posted so far I don't know much beyond "it's broke", but you probably figured that out already!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jul 2012
    Posts
    5
    Pardon the lack of details. What information would be helpful?

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    What version of VB are you using? The About splash screen would contain all of this informaiton. What compiler settings have you set in your VB project, especially the memory model?

    What SQL Anywhere driver (x86 versus x64, version number, build number, etc).

    There might well be a few more questions, but this much information will narrow the field considerably.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  5. #5
    Join Date
    Jul 2012
    Posts
    5
    Hi, sorry for the late reply!

    I'm fairly new to VB and am writing the code in Notepad++, so I'm not sure which version of VB I'm using (much less the memory model).

    The SQL Anywhere driver is x86. Is the build number different from the version number? I think the version number is 11.0.1.2808.

    Btw, I'm using an ADODB connection in the code to connect to the DB, and my connection string just consists of the DSN. The ODBC is x86.

  6. #6
    Join Date
    Jul 2012
    Posts
    5
    Do you have any other suggestions re: what to check?

Posting Permissions

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