Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.odbcnet
RE: Microsft Text Driver error - HELP
Sharique
3/6/2006 8:42:00 PM
Hi I am getting the same error for the following code. Please advise how to solve this problem
The Error message:
'conn.ServerVersion' threw an exception of type
'System.InvalidOperationException' and the conn state is closed.,
string strConn = "Password=MyPwd;User ID=MyUser;Initial Catalog=MyDB;Data Source=MyServer";
SqlDataAdapter dataAdapter;
SqlCommand cmd = new SqlCommand();
DataSet dataSet = new DataSet();
using (SqlConnection conn = new SqlConnection(strConn))
{
PrepareCommand(cmd, conn, null, CommandType.StoredProcedure, "MySp", null);
dataAdapter = new SqlDataAdapter(cmd);
dataAdapter.Fill(dataSet);
cmd.Parameters.Clear();
//return dataSet;
}
Posted via DevelopmentNow.com Groups
http://www.developm...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
RE: Microsft Text Driver error - HELP
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password