My application must support both the Access and SQL Server ADO interfaces.
When using Access I use the cStr function to convert ints to strings in the SQL query. SQL server does not support cStr and you have to use Convert or Cast.
Is there a command that is applicable to both.
Example
strSQL = " SELECT D.ID_Defect, D.Rev, D.ATA_Chapter & '-' & D.ATA_Section AS ATA, D.Defect, D.Action, " & _
"T.ID_Tech_Log, CStr(T.Tech_Log) as Tech_Log, T.Depart_Date, T.Hours, T.Cycles, T.Registration " & _
"FROM Tech_Defect D INNER JOIN Tech_Logs T ON D.Tech_Log_ID = T.ID_Tech_Log "




Reply With Quote