Home  |  Linux  | Mysql  | PHP  | XML
Deprecated: Function ereg() is deprecated in /rscs/rs/websites/lmpx.com/code/nav/common.inc on line 99
Deprecated: Function ereg() is deprecated in /rscs/rs/websites/lmpx.com/code/nav/common.inc on line 82
From:GG Date:Thu Oct 11 22:13:41 2007
Subject:Re: Cannot update null values into ase using AseCommand
Still getting Unsupported parameter type
used
cm.Parameters.Add("@last_datetime", DbType.DateTime);
cm.Parameters["@last_datetime"].Value =
System.DBNull.Value;



> Hi GG,
>
> Could you try something like
>
> cm.Parameters.Add("@last_datetime", DbType.DateTime);
> cm.Parameters["@last_datetime"].Value = Null;
>
> The Provider complains there's no datatype
>
> -Paul
>
> <GG> wrote in message
> news:470bac31.7356.1681692777@sybase.com... >I am trying
> > to update a datetime column with null but getting an
> > error. This is the code I use. Am I missing anything?
> > using (AseConnection cn = new AseConnection(
> > Database.Connection )) {
> > cn.Open();
> > using (AseCommand cm = cn.CreateCommand()) {
> > cm.CommandText = sqlCommandText;
> > cm.CommandTimeout = 60 * 5;
> > cm.CommandType = CommandType.Text;
> > cm.Parameters.Add("@last_datetime", System.DBNull.Value
> > ); return cm.ExecuteNonQuery();
> > }
> > }
> >
> > Error
> > Sybase.Data.AseClient.AseException occurred
> > Message="Unsupported parameter type"
> > Source="Sybase.AdoNet2.AseClient"
> > StackTrace:
> > at
> > Sybase.Data.AseClient1.AseCommand.CheckResult(Int32 res)
> > at
> > Sybase.Data.AseClient1.AseCommand.BindParameters()
> > at Sybase.Data.AseClient1.AseCommand.Execute() at
> > Sybase.Data.AseClient1.AseCommand.ExecuteNonQuery()
> > at
> Sybase.Data.AseClient.AseCommand.ExecuteNonQuery()
>
>
Navigate in group sybase.public.connectivity.adonet at sever forums.sybase.com
Previous Next


Your recent visits
Re: How get factory?
Re: ASE ADO.NET 2.0 versus data connections in Visual studio
Re: Are MO5.7 working on Windows Mobile6.5
Remoteware Workstation Port 80
Re: PRINT statements in SQL and SQLDataReader



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants