IonicWind Software

IWBasic => Database => Topic started by: Bruce Peaslee on September 30, 2010, 10:15:06 PM

Title: SQL hint
Post by: Bruce Peaslee on September 30, 2010, 10:15:06 PM
I have started putting the SQL statement into a separate string like this:

sSQL = "INSERT INTO Sales (nLot, sMonth, sDay, sYear, fAmount, sNote) " +_
"VALUES (" + sLotNumber + ", '" + sMonth + "', '" + sDay + "', '" + sYear + "', " + sTemp + ", '" + sNote + "')"
dbExecuteSQL(pDB, sSQL)


Not only does it make it easier to read, but you can pop the string into a message box to see exactly what the database engine is getting.
Title: Re: SQL hint
Post by: LarryMc on October 01, 2010, 05:47:19 AM
I too have used that technique before because it aids in troubleshooting.

LarryMc