Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Insert Error!
Message
 
To
18/03/2003 15:54:35
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00767245
Message ID:
00767258
Views:
16
Thank you Plamen for your reply

It's working fine.
If I have other field to be inserted with the same statment should I these steps for earch field (@ & .Parameters.Add) or I should do it only when I have date values.


>The problem is possibly in your Regional settings - date is formatted to some, which SQLServer cannot understand. The universal way is:
>
>insSql = "INSERT INTO an_paymenthdr (PaymentDate) VALUES(@PaymentDate)"
>Dim insCMD As New SqlCommand(insSql, myConn.oAdoNetSql_Conn)
>insCMD.Parameters.Add("@PaymentDate", SqlDbType.DateTime).Value = Date.Today
>
<><><><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><><><>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform