Adaptive Server Everywhere 9.0 odbc drivers

  1. Registered since
    Apr 2003
    Contributions
    986

    ODBC driver

    I have a strange problem with ODBC drivers. I'm creating a file DSN for our iSeries. This also works wonderfully. If I go back to the configuration afterwards, the error "General error: Invalid file DSN 'xxxx \ xxxx.dsn'" appears. This is then canceled and the file DSN has disappeared.
    Can someone tell me why or how to fix this error? I would like to create this DSN only once, which should then be valid for everyone and not separately on each computer.

    Thanks,
    KM

  2. With FileDSN, M $ has a problem if the number of parameters exceeds approx. 150 characters. This is the case with CA!

    This only works correctly with User / SystemDSN.

    You can also specify the parameters in the connection sequence (ConnectionString) completely yourself if you enter the driver name "Driver = {Client Access ODBC Driver (32-bit)};" give yourself away.

    E.g .:

    dim myCon as new ADODB.Connection
    with myCon
    .Connectionstring = "Provider = MSDASQL; Driver = {Client Access ODBC Driver (32-bit)}; SYSTEM = MYSYS; DBQ = MYLIB; CMT = 0; TRANSLATE = 1; CON NTYPE = 0; SEARCHPATTERN = 0;"
    .Properties ("Prompt") = adPromptComplete 'if registration required
    .open
    end with
    In this case, a DSN generation is generally no longer necessary.

  3. Registered since
    Apr 2003
    Contributions
    986
    What is meant by "if the number of parameters exceeds approx. 150 characters"? Is that the length of the entries in the DSN file when I display them, e.g. in Notepad, or what does that mean?
    Your VB example is unfortunately of no use to me because I need the ODBC connection in another application.
    Then I have to create a user or system DSN locally. Of course, I have to name these at the same time so that several users can work with the application.

    Thanks anyway,
    KM

  4. The length of the entire string (in principle the size of the file) should not exceed 150 characters.

    If you want the registration to be identical everywhere:
    Call up REGEDIT
    under "HKCU \ Software \ ODBC \ ODBC Data Sources" export the entry of your DSN name, export the entire tree "HKCU \ Software \ ODBC \ DSN-Name" into a .reg file. You can then use Notepad to create a .reg file.
    On the target computer you can transfer the .reg file to the registry by double-clicking or "right mouse button -> merge".
    This applies to user DSNs. The same goes for system DSNs, but then under HKLM.

    2nd alternative
    Edit the .dsn file with Notepad and throw out all entries that are default anyway. Then you will surely come under 150 characters.

  5. Registered since
    Apr 2003
    Contributions
    986
    So I don't really believe that with the maximum length of 150 characters. I have now created a simple standard connection and only entered the system name. This means that my file DSN has 128 characters. The first time I try, I can still call up the configuration. The second time the error comes again, although I have not changed anything and the file DSN still has 128 characters. After the error it is of course deleted again. It's all too unstable for me. I will probably create user / system DSNs after all.

    Greeting,
    KM

  6. Unfortunately this is the case. Editing of file DSNs does not work, or only via Notepad.

  7. Registered since
    Jun 2006
    Contributions
    1
    Hello!

    I have a similar problem with DSN's

    I have a front end in Access that is supposed to access MySQL databases via ODBC. System DSN and user DSN run perfectly with ODBC version 3.51.12.00, but when creating a file DSN the error message always appears: "General error: Invalid file DSN 'C: \ xxx \ xxx \ *. Dsn'"
    Even foreign, functioning DSN files did not help, seem to be somewhere in the registry when they should be valid!
    I have already tested the ODBC 5.0 alpha, same problem! The other drivers are curiously configurable.

    Does anyone know advice or had the same problem ???

  8. Since ODBC 3.0 you should do without file DSN or save the connection sequence as a whole in the program.
    All M $ products now behave in the same way.

    E.g .:
    Access keeps the entire connection sequence in the table property for linked files, so that subsequent changes to the DSN have no effect.

    Advantage:
    You do not need to explicitly configure the DSNs on other PCs.

  9. ODBC Connection to MySQL Dbs via MSA

    Hello,

    i have almost exactly the same problem.

    Via MS Access I have linked various tables with the tables in MySQL using the ODBC file DSN. It works on my computer too. However, I can't do this on any other computer. There is only 1 line in the .dsn file, so information about the connection is not saved there. The problem is that in Access I can only specify a DNS file or a System DSN in the linked table manager. The System DSN can be configured, but I cannot specify it in Access, because then access 2002 crashes, unfortunately I cannot establish a connection via DAO / ADO, because I have already created queries, forms, etc. that directly refer to the Access table. The possibility is ruled out.
    How can I make this ODBC connection work on other computers or how can I 'copy' the settings? I've already copied the reg. Keys to the other computer, but that doesn't work.
    The problem does not seem to be in Access either, but in the driver itself. After I save the DSN file, the MySQL Connector dialog appears for me to enter the connection data. This dialog does not appear on the other computers.

    How would it actually work Access without ADO / DAO, i.e. with this table link manager, to connect with mysql via ODBC, for example with a user or system DSN, or another way?

    thanks,

    Kind regards

    C. Schlueter

  10. The ODBC driver must be installed correctly.
    For testing you can set up a system / user DSN via "Control Panel-> Administration-> Data Sources".

    In Access you can then select this DSN for links.
    Since the complete connection sequence is then saved in the link, this MDB can then also run on other PCs without the DSN having to be set up there.

    The prerequisite is of course the identical connection to the source as well as a correct ODBC driver.

    This has worked for me since MS Access97!

Similar issues

  1. Answers: 6
    Last Post: 13-10-06, 09:28
  2. Answers: 2
    Last Post: 06-10-06, 15:38
  3. Answers: 2
    Last Post: 12-05-06, 11:52
  4. Answers: 1
    Last Post: 13-06-05, 19:24
  5. Answers: 1
    Last post: 12-01-01, 08:50

Permissions

  • Create new topics: No
  • Answer topics: No
  • Upload attachments: No
  • Edit posts: No
  •  

Forum rules

Advanced forum search

Google forums search

Forum & Articles
Update email


AS / 400 / IBM i

Server Expert groups

Corporate IT