Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
PaulNaude #1
How can I dig deeper into the ERROR?
VB.NET 2003
I am battling with a sepcific procedure that does not allow me to update my
data adapter due to an apparent syntax error. I created the data adapter
usign the drag and drop method (from the Server Explorer to the form) by
dragging the table in question to the form and then generating the dataset.
In a procedure I add records to the problem table based on values in other
datagrids in the following way:
Dim drw As DataRow = DataSet51.Tables("InfluenceValues").NewRow()
drw(0) = DataGrid2.Item(DataGrid2.CurrentRowIndex, 0)
drw(1) = DataGrid3.Item(DataGrid3.CurrentRowIndex, 1)
...
drw(9) = 0 '{zero}
drw(10) = 0 '{zero}
DataSet51.Tables("InfluenceValues").Rows.Add(drw)
The added records display correctly in my datagrid and does not raise any
errors. The added records also match the existing records (execpt for one
column which has unique values).
When I (try to) update the data adapter
OleDbDataAdapter8.Update(DataSet51, "InfluenceValues")
I get the error:
System.Data.OleDb.OleDbException
Syntax error in INSERT INTO statement.
The automatically generated INSERT INTO statement reads as follows:
INSERT INTO InfluenceValues (Var1, Var2, Var3, Var4, Var5, Var6, Var7, Var8,
Var9, Var10, Var11) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Adding the exact same record manually into the actual database works
perfect, but even doing it manually into the datagrid gives the same error
when trying to update.
So, the error can't be in the syntax.
Using a error trap and messagbox, I derived the following additional info:
err.source = Microsoft JET Database Engine
err.targetsite = Int32 Update(System.Data.DataRow[],......
The above left me with the idea that it has to do with the 'double' value
columns (numbers) but since the data adapter creates the supporting code
itself, I can't immagine why it wouldn't accept any of the numbers I enter (I
even tried putting the zeros in quotes ("") and also tried setting the value
equal to a value allready in the database table)
How can I get more info to identify the actual problem?
PaulNaude Guest
-
Error 403 Failed to read heders Error for long-runningCFMAIL and CFINDEX command
I have two different pages with long-running scripts on which I am recieving the following error: Error - 403 Failed to read headers to server:... -
Error Creating Control: Parser Error DocHeader does not have a property named 'cc3:MyItems'
I am having problems getting this webcontrol working properly. Everything else works fine except having items. So here is the low-down on the... -
Postscript Print error (ERROR: rangecheck; OFFENDING COMMAND: filter)
We are attempting to print off some rather large image files on a Xerox 340 and an HP Laserjet 4MV printer via Adobe Acrobat 6. Smaller similar files... -
Unexpected error. A trappable error (C0000005) occurred in an external object.
Hi Elvin, After doing some reseaarch on this problem, I found there is a lot of issues which may cause the problem, for example, incorrect access... -
An error occurred while try to load the string resources (GetModuleHandle failed with error -2147023888)
Hello, on one of our customers servers we get following error on first ASPX-page: An error occurred while try to load the string resources...



Reply With Quote

