Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Insert Error!
Message
 
À
18/03/2003 15:54:35
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
00767245
Message ID:
00767258
Vues:
15
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 <><>
<><><><><><><><><><><><><><><><><><><><>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform