Script Editor SQL Connection

--- In vantage@yahoogroups.com, "batlou" <brian.chandler@...> wrote:
>
> I am pretty new to Vantage Customization, does anyone have an example of how to create a connection to execute a SQL Statement using the Vantage Customization Script Editor?
>

Here is a sample of the code I was trying to use along with the error code.

Dim SQLStr as String
Dim ConnString as String

ConnString = "DataSource=stvan01;InitialCatalog=MfgSys803;Integrated Security=True"

SQLStr = "Insert Into UD02(key1,key2,key3) Values('1','2','3')"

Dim SQLConn as New SqlConnection()
Dim SQLCmd as NewSqlCommand()

SQLConn.ConnectionString = ConnString
SQLConn.Open

SQLCmd.Connection = SQLConn
SQLCmd.CommandText = SQLStr
SQLCmd.ExecuteNonQuery()

SQLConn.Close()



-----------Errors-----------
Error: BC40056 - line 21 (21) - Namespace or type specified in the Imports 'System.SqlClient' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Error: BC30203 - line 86 (610) - Identifier expected.
I am pretty new to Vantage Customization, does anyone have an example of how to create a connection to execute a SQL Statement using the Vantage Customization Script Editor?