Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update VFP EMPTY Dates from ADO.net
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00892754
Message ID:
00893970
Vues:
25
Somebody gave me on this forum next decision:

dim cmd as OleDBCommand
cmd =conSessionID.createcommand()
cmd.commandtext="set null off"
cmd.ExecuteNonQuery()

your next code must be here without closing this connection


After that you can add empty records... But only one NO - your table have to have something like a primary index key...




>How do you update a fox table with an empty date from dotnet?
>
>Can you do it with parameters, or do you have to build up the insert string?
>
>
>OleDbCommand cmd = new OleDbCommand("UPDATE myTable SET myDate = ? WHERE id = ?",myConn);
>OleDbParameter p = cmd.Parameters.Add("?myDate",OleDbType.Date);
>//p.Value = //What should this be?
>
>or
>
>OleDbCommand cmd = new OleDbCommand("UPDATE myTable SET myDate = {} WHERE id = 1",myConn);
>
>
>I would rather use parameters if there is a way.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform