PDA

View Full Version : Command | Insert = error...


mitchel
05-01-2009, 07:20 PM
Hi:

I have used the Insert Command a zillion times in DW MX 2004 but in DW CS3 I cannot get it to work even with the most simplest attempts.

I keep geeting the error:

Microsoft VBScript compilation error '800a0408'

Invalid character
/comp/compinsert.asp, line 4 Dim cmdInsert__@@varName@@

*************************
CODE<%
Dim cmdInsert__@@varName@@
cmdInsert__@@varName@@ = "@@defaultValue@@"
If (@@runtimeValue@@ <> "") Then
cmdInsert__@@varName@@ = @@runtimeValue@@
End If
%>
<%Set cmdInsert = Server.CreateObject ("ADODB.Command")
cmdInsert.ActiveConnection = MM_xxxxxxxxxxxx_STRING
cmdInsert.CommandText = "INSERT INTO lookup_company (company_name) VALUES ('test' ) "
cmdInsert.CommandType = 1
cmdInsert.CommandTimeout = 0
cmdInsert.Prepared = true
cmdInsert.Execute()
%>
*************************

Does anyone know how to fix this?Thanks!Mitch

Oboy
10-01-2009, 04:23 PM
I've been using DMW with ASP for many years - until CS3 I had no problems with the code. :(

What I see is when using the command (for insert, storedprocedure etc) it doesn't come out of the "extension" correctly. This gives 2 problems:

1.the ugly code - that can be corrected
2.the command doesn't show in the "server behaviors"

I've seen other simular problems that was introduced between studio 8 and CS3 - some has been corrected in CS4 - but not this particular one

I've reported this error to Adobe but the don't seem to accept these as errors - or might have othe plans :confused: