Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Andy #1
DW MX Command - error!
Hi All.
I've created a command throught the DWmx command server behaviour. I've
followed the tutorial from [url]http://www.drdev.net/article01.htm[/url] but get the
following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.
/MyWebs/Dynamic Brochure/adm1n/add_product.asp, line 64
Line 64 is: insert_product.Execute()
Has anyone else had the same problem? what's wrong with it? My code is
below:
<% If Request("Submit") <> "" Then %>
<%
set insert_product = Server.CreateObject("ADODB.Command")
insert_product.ActiveConnection = MM_Online_Brochure_STRING
insert_product.CommandText = "INSERT INTO products (" +
Replace(insert_product__CategoryID, "'", "''") + ", " +
Replace(insert_product__Product_Title, "'", "''") + ", " +
Replace(insert_product__Product_Description, "'", "''") + ", " +
Replace(insert_product__Product_Image, "'", "''") + ") VALUES ( ) "
insert_product.CommandType = 1
insert_product.CommandTimeout = 0
insert_product.Prepared = true
insert_product.Execute()
%>
<% End If %>
Andy 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:... -
man command get error message
Hi, I don't know what had happened with my system, but it seems like somthing wrong and caused many things behave strangely. One thing is for... -
Error command
i encountered this error message (after spending 2 days redrawing a seriously complex logo for a client!): "Could not complete your request because... -
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... -
Command Error
hello there this is my first time on this forum and i hope i can find the help that i need :-) Ex: i open Dreamweaver and when i try to create a... -
Andy #2
Re: DW MX Command - error!
From searching tinternet i found some code supplied by drewangell
I change my code by hand to reflect his insert into and now my insert works.
If i open the SW server behaviour, the code is re-written and then gives the
error again. Does this behaviour have a bug?
Andy
BW SB Code:
<%
set insert_product = Server.CreateObject("ADODB.Command")
insert_product.ActiveConnection = MM_Online_Brochure_STRING
insert_product.CommandText = "INSERT INTO products (" +
Replace(insert_product__categoryID, "'", "''") + ", " +
Replace(insert_product__Product_Title, "'", "''") + ", " +
Replace(insert_product__Product_description, "'", "''") + "," +
Replace(insert_product__Product_Image, "'", "''") + ") VALUES (" +
Replace(insert_product__categoryID, "'", "''") + ",' " +
Replace(insert_product__Product_Title, "'", "''") + "','" +
Replace(insert_product__Product_description, "'", "''") + "', '" +
Replace(insert_product__Product_Image, "'", "''") + "') "
insert_product.CommandType = 1
insert_product.CommandTimeout = 0
insert_product.Prepared = true
insert_product.Execute()
%>
"Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
news:d3leot$nk1$1@forums.macromedia.com...********** hand code*************> Hi All.
>
> I've created a command throught the DWmx command server behaviour. I've
> followed the tutorial from [url]http://www.drdev.net/article01.htm[/url] but get the
> following error:
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
> statement.
> /MyWebs/Dynamic Brochure/adm1n/add_product.asp, line 64
>
> Line 64 is: insert_product.Execute()
>
> Has anyone else had the same problem? what's wrong with it? My code is
> below:
>
> <% If Request("Submit") <> "" Then %>
> <%
> set insert_product = Server.CreateObject("ADODB.Command")
> insert_product.ActiveConnection = MM_Online_Brochure_STRING
> insert_product.CommandText = "INSERT INTO products (" +
> Replace(insert_product__CategoryID, "'", "''") + ", " +
> Replace(insert_product__Product_Title, "'", "''") + ", " +
> Replace(insert_product__Product_Description, "'", "''") + ", " +
> Replace(insert_product__Product_Image, "'", "''") + ") VALUES ( ) "
> insert_product.CommandType = 1
> insert_product.CommandTimeout = 0
> insert_product.Prepared = true
> insert_product.Execute()
> %>
> <% End If %>
<%
set insert_product = Server.CreateObject("ADODB.Command")
insert_product.ActiveConnection = MM_Online_Brochure_STRING
insert_product.CommandText = "INSERT INTO products (CategoryID,
Product_Title, Product_description,Product_Image) VALUES (" +
Replace(insert_product__categoryID, "'", "''") + ",' " +
Replace(insert_product__Product_Title, "'", "''") + "','" +
Replace(insert_product__Product_description, "'", "''") + "', '" +
Replace(insert_product__Product_Image, "'", "''") + "') "
insert_product.CommandType = 1
insert_product.CommandTimeout = 0
insert_product.Prepared = true
insert_product.Execute()
%>
Andy Guest



Reply With Quote

