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.
[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]
D
Dennis Ladnier
said
over 3 years ago
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?
W
Wayne Pozzar
said
over 3 years ago
If you are in the IOM API code then Import.SqlConnection should be defined.
still no luck in getting it to work - my email is dladnier@pancan.org - 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.
Dennis Ladnier
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