Ask a Question related to Dreamweaver AppDev, Design and Development.
-
tchen314 #1
Syntax error -- data type issue?
Hi,
I keep getting the following error when testing a page with form to insert
record.
System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)
.......
Parameters are set as follows:
<Parameter Name="@address" Value='<%# IIf((Request.Form("address") <>
Nothing), Request.Form("address"), "") %>' Type="WChar" />
<Parameter Value='<%# IIf((Request.Form("average_cost") <> Nothing),
Request.Form("average_cost"), "") %>' direction="Input" Name="@average_cost"
Type="Currency" />
<Parameter Name="@city" Value='<%# IIf((Request.Form("city") <> Nothing),
Request.Form("city"), "") %>' Type="WChar" />
<Parameter Value='<%# IIf((Request.Form("cost_id") <> Nothing),
Request.Form("cost_id"), "") %>' direction="Input" Name="@cost_id"
Type="Integer" />
<Parameter Name="@date_created" Value='<%#
IIf((Request.Form("date_created") <> Nothing), Request.Form("date_created"),
"") %>' Type="Date" />
<Parameter Name="@hours" Value='<%# IIf((Request.Form("hours") <>
Nothing), Request.Form("hours"), "") %>' Type="WChar" />
<Parameter Name="@name" Value='<%# IIf((Request.Form("name") <> Nothing),
Request.Form("name"), "") %>' Type="WChar" />
<Parameter Name="@note" Value='<%# IIf((Request.Form("note") <> Nothing),
Request.Form("note"), "") %>' Type="WChar" />
<Parameter Name="@payment" Value='<%# IIf((Request.Form("payment") <>
Nothing), Request.Form("payment"), "") %>' Type="WChar" />
<Parameter Name="@phone" Value='<%# IIf((Request.Form("phone") <>
Nothing), Request.Form("phone"), "") %>' Type="WChar" />
<Parameter Name="@reservation" Value='<%# IIf((Request.Form("reservation")
<> Nothing), Request.Form("reservation"), "") %>' Type="WChar" />
<Parameter Name="@states" Value='<%# IIf((Request.Form("states") <>
Nothing), Request.Form("states"), "") %>' Type="WChar" />
<Parameter Value='<%# IIf((Request.Form("style_id") <> Nothing),
Request.Form("style_id"), "") %>' direction="Input" Name="@style_id"
Type="Integer" />
i tried numeric, bigint and a few other types for where i used integer or
currency, but no luck. Does anyone have a suggestion where i should look into?
I use Access database.
thank you for your help.
tchen
tchen314 Guest
-
#39056 [NEW]: Interbase NUMERIC data type error
From: ddi at elecom dot ru Operating system: All PHP version: 5.1.6 PHP Bug Type: InterBase related Bug description: ... -
data type mismatch error...
HI guys, getting pretty stressed with this haha! it's probably something simple...right I have this registration form that does multiple checks... -
Webservice and complex data type issue
I created a webservice that returned a structure which .Net doesn't seem to like. So I created a complex type using component and cfproperty to... -
Converting data type varchar to data type money
Hi all, Tearing my hair out trying to figure this out. If anyone can provide any help i would greatly appreciate it. When I try to do an insert... -
<<Error converting data type char to smalldatetime>>
Hi All (IIS 5, SQL 2k, Win 2k) I'm stumped and can't find where I would be "mis-converting" data. I receive the following error ONLY when I update... -
Paul Whitham TMM #2
Re: Syntax error -- data type issue?
"name" is a reserved word and should not be used in database field names.
This is most likely causing the error.
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"tchen314" <webforumsuser@macromedia.com> wrote in message
news:d4f5lm$r5t$1@forums.macromedia.com...insert> Hi,
>
> I keep getting the following error when testing a page with form tohr)> record.
>
> System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
> at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32Name="@average_cost"> ......
>
> Parameters are set as follows:
> <Parameter Name="@address" Value='<%# IIf((Request.Form("address") <>
> Nothing), Request.Form("address"), "") %>' Type="WChar" />
> <Parameter Value='<%# IIf((Request.Form("average_cost") <> Nothing),
> Request.Form("average_cost"), "") %>' direction="Input"Nothing),> Type="Currency" />
> <Parameter Name="@city" Value='<%# IIf((Request.Form("city") <>Request.Form("date_created"),> Request.Form("city"), "") %>' Type="WChar" />
> <Parameter Value='<%# IIf((Request.Form("cost_id") <> Nothing),
> Request.Form("cost_id"), "") %>' direction="Input" Name="@cost_id"
> Type="Integer" />
> <Parameter Name="@date_created" Value='<%#
> IIf((Request.Form("date_created") <> Nothing),Nothing),> "") %>' Type="Date" />
> <Parameter Name="@hours" Value='<%# IIf((Request.Form("hours") <>
> Nothing), Request.Form("hours"), "") %>' Type="WChar" />
> <Parameter Name="@name" Value='<%# IIf((Request.Form("name") <>Nothing),> Request.Form("name"), "") %>' Type="WChar" />
> <Parameter Name="@note" Value='<%# IIf((Request.Form("note") <>IIf((Request.Form("reservation")> Request.Form("note"), "") %>' Type="WChar" />
> <Parameter Name="@payment" Value='<%# IIf((Request.Form("payment") <>
> Nothing), Request.Form("payment"), "") %>' Type="WChar" />
> <Parameter Name="@phone" Value='<%# IIf((Request.Form("phone") <>
> Nothing), Request.Form("phone"), "") %>' Type="WChar" />
> <Parameter Name="@reservation" Value='<%#into?> <> Nothing), Request.Form("reservation"), "") %>' Type="WChar" />
> <Parameter Name="@states" Value='<%# IIf((Request.Form("states") <>
> Nothing), Request.Form("states"), "") %>' Type="WChar" />
> <Parameter Value='<%# IIf((Request.Form("style_id") <> Nothing),
> Request.Form("style_id"), "") %>' direction="Input" Name="@style_id"
> Type="Integer" />
>
> i tried numeric, bigint and a few other types for where i used integer or
> currency, but no luck. Does anyone have a suggestion where i should look> I use Access database.
>
> thank you for your help.
> tchen
>
Paul Whitham TMM Guest
-
tchen314 #3
Re: Syntax error -- data type issue?
Thank you! name and note are reserved words. it's working now.
tchen
tchen314 Guest



Reply With Quote

