Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert without nulls from NET
Message
De
26/08/2009 11:42:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01414410
Message ID:
01420819
Vues:
45
>Hi Don,
>
>seems NULL is contrary to the documentation completely ignored in the connection string. The following code works for me:
>
>	Sub Main()
>		Dim SQL As String = "SELECT SET('NULL') from Customers"
>		Dim oConn As New OleDbConnection("Provider=VFPOLEDB.1;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\Samples\Northwind\northwind.dbc")
>		Dim oCommand As New OleDbCommand(SQL, oConn)
>		Dim oSetCommand As New OleDbCommand("SET NULL OFF", oConn)
>		oConn.Open()
>		oSetCommand.ExecuteNonQuery()
>		Console.WriteLine(oCommand.ExecuteScalar)
>		Console.ReadKey()
>		oConn.Close()
>	End Sub
>
Thanks Chris. It looks like this is going to work. I hadn't thought of sending setup commands ahead of the principle command. One thought I was puzzeling over was if I could put something in a config file to setup the environment. Do you know if that would work when accessed from the web?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform