FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister  MasterVB.NET
Visual Basic 2005 .NET Forum
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
DateTime error with 6.7.20.1
 
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Database Programming
View previous topic :: View next topic  
Message
Author
ezrasu
Newbie
Joined: 25 Jul 2006
Posts: 1

PostPosted: Tue Jul 25, 2006 4:00 am    
Post subject: DateTime error with 6.7.20.1
Reply with quote

My client-side code looks like this:

var myTable = new Ajax.Web.DataTable();
myTable.addColumn("MyDate", "System.DateTime");
var DataRow = new Object();
if(eDateTxt.value != null && eDateTxt.value != '')
{
DataRow.MyDate = new Date(eDateTxt.value);
}
else
{
DataRow.MyDate = null;
}

and server-side:

cmd.Parameters.Add(new SqlParameter("@MyDate",SqlDbType.DateTime));
if(dr["MyDate"] != null)
{
cmd.Parameters["@MyDate"].Value =
DateTime.Parse(dr["MyDate"].ToString());
}
else
{
cmd.Parameters["@MyDate"].Value = DBNull.Value;
}

I can pass the DataTable to server with 6.7.19.1 but with 6.7.20.1, I got this error message: doesn't support this method



 

Back to top
View user's profile Send private message
Author
Ezra
Newbie
Joined: 25 Jul 2006
Posts: 6

PostPosted: Tue Jul 25, 2006 4:00 am    
Post subject:
Reply with quote

My client-side code looks like this:

var myTable = new Ajax.Web.DataTable();
myTable.addColumn("MyDate", "System.DateTime");
var DataRow = new Object();
if(eDateTxt.value != null && eDateTxt.value != '')
{
DataRow.MyDate = new Date(eDateTxt.value);


}


else
{
DataRow.MyDate = null;


}


and server-side:

cmd.Parameters.Add(new SqlParameter("@MyDate",SqlDbType.DateTime));
if(dr["MyDate"] != null)
{
cmd.Parameters["@MyDate"].Value =
DateTime.Parse(dr["MyDate"].ToString());


}


else
{
cmd.Parameters["@MyDate"].Value = DBNull.Value;


}


I can pass the DataTable to server with 6.7.19.1 but with 6.7.20.1, I got this error message: doesn't support this method



 

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Database Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Archieve

Powered by phpBB © 2001, 2002 phpBB Group, used in Visual Basic 2005 .NET Forum

| Visual Basic .NET Forum | Online Recipe Archiver | Shareware Freeware PAD | Lowongan Kerja | Kamus Online | Health Supply | Digital Camera Review |
Orang Paling Keren

RSS