Start a new topic

SQL Code from Importomatic VB code

All, using importomatic is there a way to call/execute an sql command or stored procedure to pass information to/from. As an example, I want to pass the sql command/procedure the member record ID and have the sql command/procedure return a piece of data.

Thanks, Dennis

[code] Dim importID As String = oField.Value Dim systemID As Integer = 0 Dim sqlbase As String = "SELECT ID FROM RECORDS WHERE RECORDS.IMPORT_ID = '{0}'" Using sqlconn As SqlClient.SqlConnection = Import.SqlConnection, sqlcmd As SqlClient.SqlCommand = sqlconn.CreateCommand() sqlconn.Open() sqlcmd.CommandText = String.Format(sqlbase, importID) systemID = CInt(sqlcmd.ExecuteScalar()) sqlconn.Close() End Using [/code]
Wayne, please bear with me - am getting an error in that Import.SqlConnection is not defined - how do you setup your DB SQL connection string?
If you are in the IOM API code then Import.SqlConnection should be defined.

Are you in the IOM code editor?
still no luck in getting it to work - my email is - can you email me and via email I will send you all of the code/etc. Am sure this is something simple that I am overlooking.
Login or Signup to post a comment