Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert without nulls from NET
Message
From
26/08/2009 11:42:51
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01414410
Message ID:
01420819
Views:
44
>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform