error in dataset fill init
Hi all,
I've got a problem with a dataset fill.
My application uses an odbc connection to connect to sql server and extract records.
The error I get is the following:
The select command property has not been initialized before calling fill.
but my initialization code is the following:
VB Code:
CType(Me.OdbcNetDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.OdbcEmailAgentDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.OdbcEmailDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.EmailDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.EmailAgentDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.NetDataset1, System.ComponentModel.ISupportInitialize).BeginInit()
What could be my error?
Thanks
Re: error in dataset fill init
Use the System.Data.SqlClient namespace to connect to sql server and add a try catch block to get a precise error message and what line is causing the error...
Regards
Jorge
Re: error in dataset fill init
Is there any reason you are using ODBC connection instead of a SQL Connection.