Re: Conditionally create database with .NET
Posted in 2008
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. -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com