Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Insert Error!
Message
From
18/03/2003 15:54:35
 
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00767245
Message ID:
00767254
Views:
16
This message has been marked as the solution to the initial question of the thread.
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

Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000)

VB (.NET) - what other language do you need in the whole Universe?...

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform