hi, I am working on a project and what i am trying to accomplish is i want this particular code to save the values from mutiple text boxes into a excel file. When i run the code I get a exception error mesaage that states, "Syntax error in INSERT INTO statement".
P.S.
Also I was wondering once i solve this problem, i have another problem i would like to solve that is, excel will hold a maximum of 256 sheets, and 65536 rows and i was wonder what i could do so taht when it reach the end of the sheet, I want to be able to create another sheet, until there are no more sheets, left then create new excel workbook, and start over from there with a new sheet.
Private Sub selectAddExcel()
Try
' open connection
ExcelConn.Open()
' create the SQL Query to insert a row
' into the excel database
Dim daExcel As New System.Data.OleDb.OleDbCommand()
daExcel.Connection = ExcelConn
Dim checkBoxStat As String = String.Empty
If Me.chkCallBack.Checked = True Then checkBoxStat = "yes"
If Me.chkCallBack.Checked <> True Then checkBoxStat = "no"
First try enclosing reserved words, such as Date and Time, within brackets. You can also change the column names so you don't have to worry about this. Then try running your code again.
Bookmarks