Re: Conditionally create database with .NET
Posted in 2008
informix-list-bounces@iiug.org wrote on 24/11/2008 19:13:40: > Sheshnarayan Agrawal wrote: > > > > For this you have to open another connection (object) with connection > > string whereas you don't provide value of "database=" attribute. This > > will connect to only server and not database. Hence later on in your > > command object you can execute "create database ..." query. > > > > For example, In you existing scenario you might be saying something like > > this > > > > conn = new IfxConnection("Server=ol_shesh_ids1150;User > > ID=informix;password=xxx;Database=sysmaster;"); > > > > In your new connection string you have to say (without "database=" > > attribute) > > > > conn_new = new IfxConnection("Server=ol_shesh_ids1150;User > > ID=informix;password=xxx;"); > > > > and then create command object and run "create database .." query. > > Is that a .NET thing? Because I can't think of any other way of > connecting that would demand this. Shesh: ODBC also has the attribute called "connectdatabase=no", beside look at Jonathan's response on ESQL/C part. > -- > Cheers, > Obnoxio The Clown > > http://obotheclown.blogspot.com > > > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list