From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!postnews.google.com!y71g2000hsa.googlegroups.com!not-for-mail From: soychangoman@gmail.com Newsgroups: comp.lang.ada Subject: GNADE/ODBC connection problem Date: Fri, 3 Oct 2008 06:14:52 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 190.246.68.56 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1223039692 2754 127.0.0.1 (3 Oct 2008 13:14:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 3 Oct 2008 13:14:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y71g2000hsa.googlegroups.com; posting-host=190.246.68.56; posting-account=qyu9oAoAAADnlcmgaGLAx2wCGPoJM9US User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092814 Iceweasel/3.0.1 (Debian-3.0.1-1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2215 Date: 2008-10-03T06:14:52-07:00 List-Id: I'm trying to use GNADE to connect to a MySQL database but i keep getting the same error: raised GNU.DB.SQLCLI.DRIVER_ERROR : [Proc=3DSQLConnect][Server=3D][State=3DIM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified I'm using Debian Sid with and amd64 architecture. This is the code I'm trying to run: -------------------------------------------- with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with GNU.DB.SQLCLI; use GNU.DB.SQLCLI; with GNU.DB.SQLCLI.Environment_Attribute; use GNU.DB.SQLCLI.Environment_Attribute; procedure sql_test_2 is EnvironmentHandle : SQLHENV; ConnectionHandle : SQLHDBC; DSN : Unbounded_String :=3D To_Unbounded_String("gnade"); UserName : Unbounded_String :=3D To_Unbounded_String("gnade"); Password : Unbounded_String :=3D To_Unbounded_String("gnade"); begin SQLAllocHandle ( SQL_HANDLE_ENV, SQL_NULL_HANDLE, EnvironmentHandle ); SQLSetEnvAttr ( EnvironmentHandle, Environment_Attribute_ODBC_Version' (Attribute =3D> SQL_ATTR_ODBC_VERSION, Value =3D> SQL_OV_ODBC3) ); SQLAllocHandle (SQL_HANDLE_DBC, EnvironmentHandle, ConnectionHandle); SQLConnect(ConnectionHandle =3D> ConnectionHandle, ServerName =3D> To_String(DSN), UserName =3D> To_String(UserName), Authentication =3D> To_String(Password)); end sql_test_2; --------------------------------------------- The "gnade" database does exists and I have installed almost all the drivers I could find. Thanks Mat=EDas Niklison