OleDbCommandBuilder.DeriveParameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi to all,

Im getting an error that in theory is simple but i dont understand...

This is the line when i get the error, and the oledbcmd is well created,
with the connection opened, the command text set to GetScheduledGames, and
the CommandType set to Stored procedure... Im querying against ms- access

OleDbCommandBuilder.DeriveParameters(this.oledbcmd);

The error that i get is that :

The stored procedure 'GetScheduledGames' doesn't exist. But the query
GetScheduledGames exists... What could be the cause??
 
Hi
please post your code snippet.it's not enough to understanding your
problem!!


Thanks
A.Hadi
 
Hi Hadi,

I already solve my last post, but i have a new one problem...

Im getting this error

Retrieving procedure parameter information is not supported by the
'Microsoft.Jet.OLEDB.4.0' provider

Im using the DeriveParameter method of the OleDbCommandBuilder.

Im trying to execute the "Employee Sales by Country" procedure in the
Northwind database.

What could i do to solve this error?... I dont have any idea..

here some code:

if(this.DbType==DataBaseType.Access)
{
_commoncnx=new OleDbConnection(this.ConnectionString);
this.Commoncmd=new OleDbCommand();
OleDbCommand cmd=new OleDbCommand();
}
else if(this.DbType==DataBaseType.SqlServer)
{

//abro conexion
_commoncnx=new SqlConnection(this.ConnectionString);
this.Commoncmd=new SqlCommand();
}
else //por defecto SqlServer
{
//abro conexion
_commoncnx=new SqlConnection(this.ConnectionString);
this.Commoncmd=new SqlCommand();
}
this.Commoncmd.Connection=_commoncnx;
this.Commoncmd.CommandType=CommandType.StoredProcedure;
this.Commoncmd.CommandText=this.ProcedureName;
_commoncnx.Open();

if(this.DbType==DataBaseType.Access)
{
OleDbCommandBuilder.DeriveParameters((OleDbCommand) this.Commoncmd);
}
else if(this.DbType==DataBaseType.SqlServer)
{
SqlCommandBuilder.DeriveParameters((SqlCommand) this.Commoncmd);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top