Contributions
DB connection query via notepad
Hello all, I have a very big query to be fetched from a notepad/sql file. Instead of passing an inline DB query like: strSQLQuery = "INSERT INTO " &strTblNM& " (" &strCols& ") VALUES (" &strVals& ")" I want the query to be passed from a notepad. I fetched it like: Dim F, s Set F = aqFile.OpenTextFile("D:/wellinsert.txt", aqFile.faRead, aqFile.ctANSI) F.Cursor = 0 While Not F.IsEndOfFile() s = F.ReadLine() WEnd F.Close() I could fetch the query successfully. I am not getting any error, when I perform: objCon.Execute s but, the DB is not getting updated. If the same query, I pass inline, I can see the DB getting updated. Can someone tell me how to deal with accepting DB queries via external files? Thanks, Vishakha973Views0likes2Comments