I am currently writing an output file that is generated using some Mapbasic Code into a MS SQL Database:
Dim SQL_output_tablename as String SQL_output_tablename = """dbo"""&"."&"""ClientOutput_" + CurrentDay + "_" + CurrentMonth + "_" + CurrentYear + "_" + CurrentHour + "h" + CurrentMinute + "m""" Commit Table Client As "C:\Program Files\MapInfo\Mapinfo_SQL\Client.TAB" **Type ODBC Connection 1** Table SQL_output_tablename Type SQLServerSpatial Geometry ConvertDateTime ON Interactive
The issue is that I am unsure of how to reference the ODBC connection using the name instead of the assigned Index. Mapinfo gives the connections an Index, 1 being assigned to the first ODBC connection opened etc.
Is it possible to write the code differently and specify the ODBC connection (The name and not the index) to be used when writing to a DB?