08. december 2011 - 18:29
Der er
7 kommentarer og
1 løsning
Forkert format på INSERT TO (SQL) i makro
Hej
Jeg har følgende kode:
strSQL = "INSERT INTO DD_anlægsnote ( Position, Id, Tekst, Dato, E1, E2, E3, E4, Sum ) values " & "(" & a(i, 1) & ",'" & a(i, 2) & "','" & a(i, 3) & "','" & a(i, 4) & "'," & CCToD(a(i, 5)) & "," & CCToD(a(i, 6)) & "," & CCToD(a(i, 7)) & "," & CCToD(a(i, 8)) & ")"
Men den siger at det er forkert format.
Håber på hjælp
/Andres
08. december 2011 - 19:02
#1
Try placing a breakpoint after the line of code and then copy the contents of strSQL to a query.
You can get the contents of strSQL by entering
?strSQL
in the immediate window (CTRL+G)
Do you habeve the functions a() and CCToD as global public?
08. december 2011 - 19:24
#3
In code view click with the mouse on the left margin beside the line of code you want to stop at when the code runs.
You should get a brown/red round symbol.
Then run your code and it will to to yellow when the break point is reached.