Mono-project with IDS 11.70 : exerience?
Posted in 2011
A developer on openSUSE 11.4 x86-64 with IDS 11.70.FC1 and Client SDK 3.70 could connect via dbaccess and unixODBC's isql, but a Mono/C# program using OdbcConnection.Open() with DSN=Informix failed with an almost empty error ("ERROR [I000] [unixODBC]["); the same program worked against a MySQL DSN. Respondents asked for the odbc.ini/odbcinst.ini settings and suggested adding UNICODE=UCS-2; when the poster put it inside the DSN stanza and it still failed, he was told it must go in a separate [ODBC] section. The thread ends there, with no confirmation that this fixed it.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration
Are there any previous experience with the application development under mono (.NET / Linux) ? We are try to establish an odbc connection to the IDS server, but the command "OdbcConnection.open" always failed. Dbaccess, isql (from unixODBC) or other SQL tools have no problems to start a database connection. Martin Thole
Do you have an error message or something that we can work on? Regards. On Wed, May 18, 2011 at 2:06 PM, Martin Thole <mth@o-b-s.de> wrote: > Are there any previous experience with the application development > under mono (.NET / Linux) ? > > We are try to establish an odbc connection to the IDS server, but > the command "OdbcConnection.open" always failed. > Dbaccess, isql (from unixODBC) or other SQL tools have no > problems to start a database connection. > > > Martin Thole > > > > > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently...
Unfortunately the error message ist almost empty: >mono dbtest.exe DSN=Informix DSN=Informix ERROR [I000] [unixODBC][ NO ODBC-Connection -- PROGRAMSTOP >mono dbtest.exe DSN=MySQL DSN=MySQL ODBC-Connection open <<< OK >>> Plattform: openSuSE 11.4 x86-64 with IDS 11.70.FC1 and C-SDK 3.70.FC1 Here the C#-Code: using System; using System.Data; using System.Data.Odbc; public class DBTest { static public void Main(string[] args) { string strConnection; strConnection = args[0]; Console.WriteLine (strConnection); OdbcConnection connection = new OdbcConnection(strConnection); try { connection.Open(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine("No ODBC-Connection -- PROGRAM STOP"); return ; } Console.WriteLine("ODBC-Connection open "); } } "Fernando Nunes" <domusonline@gmail.com> schrieb im Newsbeitrag news:mailman.949.1305724453.1071.informix-list@iiug.org... Do you have an error message or something that we can work on? Regards. On Wed, May 18, 2011 at 2:06 PM, Martin Thole <mth@o-b-s.de> wrote: Are there any previous experience with the application development under mono (.NET / Linux) ? We are try to establish an odbc connection to the IDS server, but the command "OdbcConnection.open" always failed. Dbaccess, isql (from unixODBC) or other SQL tools have no problems to start a database connection. Martin Thole _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently...
"Martin Thole" <mth@o-b-s.de> writes: > Unfortunately the error message ist almost empty: > >>mono dbtest.exe DSN=Informix > DSN=Informix > ERROR [I000] [unixODBC][ > NO ODBC-Connection -- PROGRAMSTOP What have you got in ~/.odbc.ini (and perhaps /etc/odbc.ini)? Possibly you are missing the following fragment: [ODBC] UNICODE=UCS-2 -- http://www.greenend.org.uk/rjk/
Hmmmm.... My lack of knowledge about Mono is a problem... But I'm assuming you're passing "DSN=Informix" as an argument to dbtest.exe. And then you call this: OdbcConnection connection = new OdbcConnection(strConnection); Do you have some kind of configuration where you define your DSNs? How are you supposed to map "Informix" into something useful for the Informix layer like INFORMIXSERVER, hostname, port etc? At the same time is your Informix environment properly setup (INFORMIXDIR, INFORMIXSERVER, INFORMIXSQLHOSTS etc.)? Regards. On Wed, May 18, 2011 at 2:26 PM, Martin Thole <mth@o-b-s.de> wrote: > > Unfortunately the error message ist almost empty: > > >mono dbtest.exe DSN=Informix > DSN=Informix > ERROR [I000] [unixODBC][ > NO ODBC-Connection -- PROGRAMSTOP > > >mono dbtest.exe DSN=MySQL > DSN=MySQL > ODBC-Connection open <<< OK >>> > > > Plattform: openSuSE 11.4 x86-64 with IDS 11.70.FC1 and C-SDK 3.70.FC1 > > Here the C#-Code: > > using System; > using System.Data; > using System.Data.Odbc; > > public class DBTest > { > static public void Main(string[] args) > { > string strConnection; > strConnection = args[0]; > Console.WriteLine (strConnection); > OdbcConnection connection = new OdbcConnection(strConnection); > try { > connection.Open(); > } > catch (Exception ex) > { > Console.WriteLine(ex.Message); > Console.WriteLine("No ODBC-Connection -- PROGRAM STOP"); > return ; > } > Console.WriteLine("ODBC-Connection open "); > } } > > > "Fernando Nunes" <domusonline@gmail.com> schrieb im Newsbeitrag > news:mailman.949.1305724453.1071.informix-list@iiug.org... > Do you have an error message or something that we can work on? > Regards. > > > On Wed, May 18, 2011 at 2:06 PM, Martin Thole <mth@o-b-s.de> wrote: > > Are there any previous experience with the application development > under mono (.NET / Linux) ? > > We are try to establish an odbc connection to the IDS server, but > the command "OdbcConnection.open" always failed. > Dbaccess, isql (from unixODBC) or other SQL tools have no > problems to start a database connection. > > > Martin Thole > > > > > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > > > > > -- > Fernando Nunes > Portugal > > http://informix-technology.blogspot.com > My email works... but I don't check it frequently... > > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently...
We use the unixODBC package:
File odbc.ini:
[INFORMIX]
Driver=Informix
Server=ifx_server
Database=vulkan
UNICODE=UCS-2 // New, but still no connection
CLIENT_LOCALE=en_us.8859-1
DB_LOCALE=en_us.8859-1TRANSLATIONDLL=/opt/informix/lib/esql/igo4a304.so
File odbcinst.ini:
[Informix]
Description = IBM-Informix ODBC 3.70
Driver = /opt/informix/lib/cli/iclit09b.so // also tried:
libifcli.so with no result
Driver64 = /opt/informix/lib/cli/iclit09b.so
Setup = /opt/informix/lib/cli/iclit09b.so
Setup64 = /opt/informix/lib/cli/iclit09b.so
UsageCount = 1
APILevel=1
ConnectFunctions=YYY
DriverODBCVer=03.51
FileUsage=0
SQLLevel=1
smProcessPerConnect=Y
"Fernando Nunes" <domusonline@gmail.com> schrieb im Newsbeitrag
news:mailman.950.1305726122.1071.informix-list@iiug.org...
Hmmmm.... My lack of knowledge about Mono is a problem...
But I'm assuming you're passing "DSN=Informix" as an argument to dbtest.exe.
And then you call this:
OdbcConnection connection = new OdbcConnection(strConnection);
Do you have some kind of configuration where you define your DSNs?
How are you supposed to map "Informix" into something useful for the
Informix layer like INFORMIXSERVER, hostname, port etc?
At the same time is your Informix environment properly setup (INFORMIXDIR,
INFORMIXSERVER, INFORMIXSQLHOSTS etc.)?
Regards.
On Wed, May 18, 2011 at 2:26 PM, Martin Thole <mth@o-b-s.de> wrote:
Unfortunately the error message ist almost empty:
>mono dbtest.exe DSN=Informix
DSN=Informix
ERROR [I000] [unixODBC][
NO ODBC-Connection -- PROGRAMSTOP
>mono dbtest.exe DSN=MySQL
DSN=MySQL
ODBC-Connection open <<< OK >>>
Plattform: openSuSE 11.4 x86-64 with IDS 11.70.FC1 and C-SDK 3.70.FC1
Here the C#-Code:
using System;
using System.Data;
using System.Data.Odbc;
public class DBTest
{
static public void Main(string[] args)
{
string strConnection;
strConnection = args[0];
Console.WriteLine (strConnection);
OdbcConnection connection = new OdbcConnection(strConnection);
try {
connection.Open();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine("No ODBC-Connection -- PROGRAM STOP");
return ;
}
Console.WriteLine("ODBC-Connection open ");
} }
"Fernando Nunes" <domusonline@gmail.com> schrieb im Newsbeitrag
news:mailman.949.1305724453.1071.informix-list@iiug.org...
Do you have an error message or something that we can work on?
Regards.
On Wed, May 18, 2011 at 2:06 PM, Martin Thole <mth@o-b-s.de> wrote:
Are there any previous experience with the application development
under mono (.NET / Linux) ?
We are try to establish an odbc connection to the IDS server, but
the command "OdbcConnection.open" always failed.
Dbaccess, isql (from unixODBC) or other SQL tools have no
problems to start a database connection.
Martin Thole
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
Thanks for your advise. I have tried:
File odbc.ini:
[INFORMIX]
Driver=Informix
Server=ifx_server
Database=vulkan
UNICODE=UCS-2 // New, but still no connection
CLIENT_LOCALE=en_us.8859-1
DB_LOCALE=en_us.8859-1TRANSLATIONDLL=/opt/informix/lib/esql/igo4a304.so
But still no odbc connection and still no better error message.
"Richard Kettlewell" <rjk@greenend.org.uk> schrieb im Newsbeitrag
news:87k4docelf.fsf@araminta.anjou.terraraq.org.uk...
> "Martin Thole" <mth@o-b-s.de> writes:
>
>> Unfortunately the error message ist almost empty:
>>
>>>mono dbtest.exe DSN=Informix
>> DSN=Informix
>> ERROR [I000] [unixODBC][
>> NO ODBC-Connection -- PROGRAMSTOP
>
> What have you got in ~/.odbc.ini (and perhaps /etc/odbc.ini)?
>
> Possibly you are missing the following fragment:
>
> [ODBC]
> UNICODE=UCS-2
>
> --
> http://www.greenend.org.uk/rjk/
"Martin Thole" <mth@o-b-s.de> writes:
>> What have you got in ~/.odbc.ini (and perhaps /etc/odbc.ini)?
>>
>> Possibly you are missing the following fragment:
>>
>> [ODBC]
>> UNICODE=UCS-2
>
> Thanks for your advise. I have tried:
>
> File odbc.ini:
>
> [INFORMIX]
> Driver=Informix
> Server=ifx_server
> Database=vulkan
> UNICODE=UCS-2 // New, but still no connection
> CLIENT_LOCALE=en_us.8859-1
> DB_LOCALE=en_us.8859-1> TRANSLATIONDLL=/opt/informix/lib/esql/igo4a304.so
>
> But still no odbc connection and still no better error message.
It needs to be in a distinct [ODBC] section, as shown.
--
http://www.greenend.org.uk/rjk/