Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3618770
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:47:41+00:00 2026-05-18T22:47:41+00:00

I’m working against a Informix DB from C# ASP .Net 4.0 via an ODBC

  • 0

I’m working against a Informix DB from C# ASP .Net 4.0 via an ODBC connection. This database does change frequently so I read out what DBs that are installed from the sysmaster table.

Depending on choice my user makes I need to setup a ODBC connection to the choosen DB or change the current connection to change from the systmaster DB to the one choosen.

Anyone got any idea how to do this? I suspect it must be possible to setup a temporary ODBC connection. Also in Visual Studio under the properties for my ODBC connection I do have a connection string looking like this:

Dsn=Informix;uid=xxxxx;database=sysmaster;host=10.10.10.10;srvr=testdb1;serv=3000;pro=onsoctcp;cloc=en_US.819;dloc=en_US.819;vmb=0;curb=0;scur=0;icur=0;oac=1;optofc=0;rkc=0;odtyp=0;ddfp=0;dnl=0;rcwc=0

I have looked around for a library to connect directly without the ODBC to informix but with now success.

Thanks,
Stefan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:47:42+00:00Added an answer on May 18, 2026 at 10:47 pm

    I have worked out a working solution that is quite nice. I did not realise .NET had full support to do this from code behind without actually modifying the ODBC settings.

        const string sConnString = "Driver=Informix;uid=user;pwd=password;database=x10stg01_1312;host=10.10.10.10;srvr=testdb1;serv=3000;pro=onsoctcp;cloc=en_US.819;dloc=en_US.819;vmb=0;curb=0;scur=0;icur=0;oac=1;optofc=0;rkc=0;odtyp=0;ddfp=0;dnl=0;rcwc=0";
        var oOdbcConnection = new System.Data.Odbc.OdbcConnection(sConnString);
    
        string queryString =
            "SELECT * FROM tevoc WHERE ev_oc_id=6599098";
        OdbcCommand command = new OdbcCommand(queryString);
    
        command.Connection = oOdbcConnection;
        oOdbcConnection.Open();
        OdbcDataReader odbcDataReader = command.ExecuteReader();
    
        while (odbcDataReader.Read())
        {
            CheckDiv.InnerHtml += "Result: " + odbcDataReader.GetString(6) + "<br/>";
        }
    

    I guess you have to setup a working ODBC connection one before trying the code behind to just be sure the Driver can be located ok or at least look in the list of available ODBC drivers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a view passing on information from a database: def serve_article(request, id): served_article
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.