PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Re: Connecting to Informix [Again]

Reply

Re: Connecting to Informix [Again]

 
Thread Tools Rate Thread
Old 30-06-2003, 06:44 AM   #1
Gregg Walker
Guest
 
Posts: n/a
Default Re: Connecting to Informix [Again]


Data Source entry for me is rmca@pythonnet.

Database is rmca.
Informix Server entry from setnet32 is pythonnet.

Another thing you might try if still having problems is to set Persist
Security Info to False if you are setting it to true.

Gregg Walker

"Abhishek Srivastava" <abhishek@nospam.net> wrote in message
news:041601c33eb3$01aaba60$a101280a@phx.gbl...
> What is the value of your variable datasource?
>
> regards,
> Abhishek.
> >-----Original Message-----
> >Hello Abhishek ,
> >
> >It looks like your missing double quotes around your

> parameter values. Here's a function I use in my c# apps
> to build
> >connection string for Informix.
> >
> >private string InformixConnectionString(string UserID,

> string Password, string Database, string ServerName)
> >{
> > string dataSource = Database.Trim().ToLower() + "@" +

> ServerName.Trim().ToLower();
> >
> > return
> > "Provider=Ifxoledbc.2;" +
> > "Connect Timeout=30;" +
> > "Password=\"" + Password + "\";" +
> > "Persist Security Info=False;" +
> > "User ID=\"" + UserID + "\";" +
> > "Data Source=\"" + dataSource + "\";" +
> > "Extended Properties=\"\"";
> >}
> >
> >Hope that helps.
> >
> >Sincerely,
> >Gregg Walker
> >
> >"Abhishek Srivastava" <abhishek@nospam.net> wrote in

> message news:088401c33c7f$55cac0d0$a301280a@phx.gbl...
> >> Hello All,
> >>
> >> I am trying to connect to informix from my C#

> application.
> >> However, the program fails to connect to Informix.
> >>
> >> I am able to connect to the same database using java

> and
> >> I am able to create an ODBC data source successfully.

> But
> >> my C# program still fails.
> >>
> >> The details of my Informix server are
> >>
> >> Server Name : abhi_srv
> >> Host Name : localhost
> >> Service : 8989
> >> Protocol: olsoctcp
> >> DataBase Name: abhi
> >> User Id: myUser
> >> Password: myPass
> >>
> >> When I enter these settings and create and test a odbc
> >> DSN the test succeeds.
> >>
> >> But when I write a C# application with the connection
> >> string
> >>
> >> Provider=Ifxoledbc.2;password=myPas;User ID=myUser;Data
> >> Source=abhi@localhost;Persist Security Info=true
> >>
> >> The connection fails with the error
> >> Unhandled Exception: System.Data.OleDb.OleDbException:

> No
> >> error information avalable: E_FAIL(0x80004005).
> >> at System.Data.OleDb.OleDbConnection.ProcessResults
> >> (Int32 hr)
> >> at

> System.Data.OleDb.OleDbConnection.InitializeProvider
> >> ()
> >> at System.Data.OleDb.OleDbConnection.Open()
> >> at InformixTest.Main(String[] args)
> >>
> >> I will be very gratefull if you could tell me what is
> >> wrong with my connection string.
> >>
> >> regards,
> >> Abhishek.

> >
> >
> >.
> >



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off