asp_databases thread: asp access database insert help!
Message #1 by "Ling" <linglinglee@h...> on Thu, 13 Dec 2001 17:50:09
|
|
I double checked the insert statement and at times took it out to test.
, I keep getting this same error message:
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/test/webscreen4.asp, line 14
Could anyone out there see anything I missed?
Thanks for helping,
Ling
--------------------------------------------------------
My code is:
cn="Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsv100"
Set rs = Server.CreateObject("ADODB.Recordset")
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandText = "Insert Into Food_Stamp_Applications "&_
"(Ethnicity_White, Ethnicity_Cambodian, Ethnicity_Korean, "&_
"Ethnicity_Cantonese,Ethnicity_Mandarin,Ethnicity_Thai, "&_
"Ethnicity_Vietnamese,Ethnicity_Other,PriLang_English, "&_
"PriLang_Spanish,PriLang_Arabic,PriLang_Armenian, "&_
"PriLang_Bengali,PriLang_Cambodian_Khmer,PriLang_Cantonese, "&_
"PriLang_Chamorro,PriLang_Croatian,PriLang_Farsi, "&_
"PriLang_Hindi,PriLang_Hmong,PriLang_Hungarian, "&_
"PriLang_Japanese,PriLang_Korean,PriLang_Laotian, "&_
"PriLang_Mandarin,PriLang_Russian,PriLang_Samoan, "&_
"PriLang_Serbian,PriLang_Slovak,PriLang_Tagalog-Ceb-Ilo, "&_
"PriLang_Thai,PriLang_Tongan,PriLang_Ukranian,PriLang_Urdu, "&_
"PriLang_Vietnamese,PriLang_Other,Benefits_CalWorks, "&_
"Benefits_CAPI,Benefits_GeneralRelief,Benefits_HealthFamilies, "&_
"Benefits_MediCal,Benefits_SocialSecurity, "&_
"Benefits_Unemployment,Benefits_Other,TotalMembers, "&_
"EligibleMembers,Age60_Or_Over,TotalMonthlyIncome, "&_
"TotalMonthlyExpenses_PartA, "&_
"TotalMonthlyExpenses_PartB,TotalResources) "&_
"values('"&request.form("Ethnicity_White") &"', "&_
"'"&request.form("Ethnicity_Cambodian")&"', "&_
"'"&request.form("Ethnicity_Korean")&"', "&_
"'"&request.form("Ethnicity_Cantonese")&"', "&_
"'"&request.form("Ethnicity_Mandarin")&"', "&_
"'"&request.form("Ethnicity_Thai")&"', "&_
"'"&request.form("Ethnicity_Vietnamese")&"', "&_
"'"&request.form("Ethnicity_Other")&"', "&_
"'"&request.form("PriLang_English")&"', "&_
"'"&request.form("PriLang_Spanish")&"', "&_
"'"&request.form("PriLang_Arabic")&"', "&_
"'"&request.form("PriLang_Armenian")&"', "&_
"'"&request.form("PriLang_Bengali")&"', "&_
"'"&request.form("PriLang_Cambodian_Khmer")&"', "&_
"'"&request.form("PriLang_Cantonese")&"', "&_
"'"&request.form("PriLang_Chamorro")&"', "&_
"'"&request.form("PriLang_Croatian")&"', "&_
"'"&request.form("PriLang_Farsi")&"', "&_
"'"&request.form("PriLang_Hindi")&"', "&_
"'"&request.form("PriLang_Hmong")&"', "&_
"'"&request.form("PriLang_Hungarian")&"', "&_
"'"&request.form("PriLang_Japanese")&"', "&_
"'"&request.form("PriLang_Korean")&"', "&_
"'"&request.form("PriLang_Laotian")&"', "&_
"'"&request.form("PriLang_Mandarin")&"', "&_
"'"&request.form("PriLang_Russian")&"', "&_
"'"&request.form("PriLang_Samoan")&"', "&_
"'"&request.form("PriLang_Serbian")&"', "&_
"'"&request.form("PriLang_Slovak")&"', "&_
"'"&request.form("PriLang_Tagalog-Ceb-Ilo")&"', "&_
"'"&request.form("PriLang_Thai")&"', "&_
"'"&request.form("PriLang_Tongan")&"', "&_
"'"&request.form("PriLang_Ukranian")&"', "&_
"'"&request.form("PriLang_Urdu")&"', "&_
"'"&request.form("PriLang_Vietnamese")&"', "&_
"'"&request.form("PriLang_Other")&"', "&_
"'"&request.form("Benefits_CalWorks")&"', "&_
"'"&request.form("Benefits_CAPI")&"', "&_
"'"&request.form("Benefits_GeneralRelief")&"', "&_
"'"&request.form("Benefits_HealthFamilies")&"', "&_
"'"&request.form("Benefits_MediCal")&"', "&_
"'"&request.form("Benefits_SocialSecurity")&"', "&_
"'"&request.form("Benefits_Unemployment")&"', "&_
"'"&request.form("Benefits_Other")&"', "&_
"'"&request.form("TotalMembers")&"', "&_
"'"&request.form("EligibleMembers")&"', "&_
"'"&request.form("Age60_Or_Over")&"', "&_
"'"&cint(request.form("TotalMonthlyIncome"))&"', "&_
"'"&cint(request.form("TotalMonthlyExpenses_PartA"))&"', "&_
"'"&cin(request.form("TotalMonthlyExpenses_PartB"))&"', "&_
"'"&cint(request.form("TotalResources"))&"')"
objCommand.CommandType = adCmdText
objCommand.Execute IntNoOfRecords
Set objCommand = Nothing
%>
Message #2 by gbrown@c... on Thu, 13 Dec 2001 18:17:18
|
|
Hi
You are referring to something to cin and not cint on one line.
A single quote means you are inserting into a character/string variable
So it looks like you may be trying to put a numeric into a string as well
Response.write the line of sql and check if you do have '' around
variables that should not have.
Suggest that you put take all the fields out and put them back in one at a
time until you get the error.
> I double checked the insert statement and at times took it out to test.
> , I keep getting this same error message:
> Error Type:
> ADODB.Command (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
> /test/webscreen4.asp, line 14
>
>
> Could anyone out there see anything I missed?
> Thanks for helping,
> Ling
> --------------------------------------------------------
> My code is:
>
> cn="Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsv100"
> Set rs = Server.CreateObject("ADODB.Recordset")
> Set objCommand = Server.CreateObject("ADODB.Command")
>
> objCommand.ActiveConnection = strConnect
> objCommand.CommandText = "Insert Into Food_Stamp_Applications "&_
> "(Ethnicity_White, Ethnicity_Cambodian, Ethnicity_Korean, "&_
> "Ethnicity_Cantonese,Ethnicity_Mandarin,Ethnicity_Thai, "&_
> "Ethnicity_Vietnamese,Ethnicity_Other,PriLang_English, "&_
> "PriLang_Spanish,PriLang_Arabic,PriLang_Armenian, "&_
> "PriLang_Bengali,PriLang_Cambodian_Khmer,PriLang_Cantonese, "&_
> "PriLang_Chamorro,PriLang_Croatian,PriLang_Farsi, "&_
> "PriLang_Hindi,PriLang_Hmong,PriLang_Hungarian, "&_
> "PriLang_Japanese,PriLang_Korean,PriLang_Laotian, "&_
> "PriLang_Mandarin,PriLang_Russian,PriLang_Samoan, "&_
> "PriLang_Serbian,PriLang_Slovak,PriLang_Tagalog-Ceb-Ilo, "&_
> "PriLang_Thai,PriLang_Tongan,PriLang_Ukranian,PriLang_Urdu, "&_
> "PriLang_Vietnamese,PriLang_Other,Benefits_CalWorks, "&_
> "Benefits_CAPI,Benefits_GeneralRelief,Benefits_HealthFamilies, "&_
> "Benefits_MediCal,Benefits_SocialSecurity, "&_
> "Benefits_Unemployment,Benefits_Other,TotalMembers, "&_
> "EligibleMembers,Age60_Or_Over,TotalMonthlyIncome, "&_
> "TotalMonthlyExpenses_PartA, "&_
> "TotalMonthlyExpenses_PartB,TotalResources) "&_
> "values('"&request.form("Ethnicity_White") &"', "&_
> "'"&request.form("Ethnicity_Cambodian")&"', "&_
> "'"&request.form("Ethnicity_Korean")&"', "&_
> "'"&request.form("Ethnicity_Cantonese")&"', "&_
> "'"&request.form("Ethnicity_Mandarin")&"', "&_
> "'"&request.form("Ethnicity_Thai")&"', "&_
> "'"&request.form("Ethnicity_Vietnamese")&"', "&_
>
> "'"&request.form("Ethnicity_Other")&"', "&_
>
> "'"&request.form("PriLang_English")&"', "&_
>
> "'"&request.form("PriLang_Spanish")&"', "&_
>
> "'"&request.form("PriLang_Arabic")&"', "&_
>
> "'"&request.form("PriLang_Armenian")&"', "&_
>
> "'"&request.form("PriLang_Bengali")&"', "&_
>
> "'"&request.form("PriLang_Cambodian_Khmer")&"', "&_
>
> "'"&request.form("PriLang_Cantonese")&"', "&_
>
> "'"&request.form("PriLang_Chamorro")&"', "&_
>
> "'"&request.form("PriLang_Croatian")&"', "&_
>
> "'"&request.form("PriLang_Farsi")&"', "&_
>
> "'"&request.form("PriLang_Hindi")&"', "&_
>
> "'"&request.form("PriLang_Hmong")&"', "&_
>
> "'"&request.form("PriLang_Hungarian")&"', "&_
>
> "'"&request.form("PriLang_Japanese")&"', "&_
>
> "'"&request.form("PriLang_Korean")&"', "&_
>
> "'"&request.form("PriLang_Laotian")&"', "&_
>
> "'"&request.form("PriLang_Mandarin")&"', "&_
>
> "'"&request.form("PriLang_Russian")&"', "&_
>
> "'"&request.form("PriLang_Samoan")&"', "&_
>
> "'"&request.form("PriLang_Serbian")&"', "&_
>
> "'"&request.form("PriLang_Slovak")&"', "&_
>
> "'"&request.form("PriLang_Tagalog-Ceb-Ilo")&"', "&_
>
> "'"&request.form("PriLang_Thai")&"', "&_
>
> "'"&request.form("PriLang_Tongan")&"', "&_
>
> "'"&request.form("PriLang_Ukranian")&"', "&_
>
> "'"&request.form("PriLang_Urdu")&"', "&_
>
> "'"&request.form("PriLang_Vietnamese")&"', "&_
>
> "'"&request.form("PriLang_Other")&"', "&_
>
> "'"&request.form("Benefits_CalWorks")&"', "&_
> "'"&request.form("Benefits_CAPI")&"', "&_
> "'"&request.form("Benefits_GeneralRelief")&"', "&_
> "'"&request.form("Benefits_HealthFamilies")&"', "&_
> "'"&request.form("Benefits_MediCal")&"', "&_
> "'"&request.form("Benefits_SocialSecurity")&"', "&_
>
> "'"&request.form("Benefits_Unemployment")&"', "&_
> "'"&request.form("Benefits_Other")&"', "&_
> "'"&request.form("TotalMembers")&"', "&_
> "'"&request.form("EligibleMembers")&"', "&_
> "'"&request.form("Age60_Or_Over")&"', "&_
> "'"&cint(request.form("TotalMonthlyIncome"))&"', "&_
>
> "'"&cint(request.form("TotalMonthlyExpenses_PartA"))&"', "&_
>
> "'"&cin(request.form("TotalMonthlyExpenses_PartB"))&"', "&_
>
> "'"&cint(request.form("TotalResources"))&"')"
>
> objCommand.CommandType = adCmdText
> objCommand.Execute IntNoOfRecords
> Set objCommand = Nothing
> %>
Message #3 by "Ling" <linglinglee@h...> on Thu, 13 Dec 2001 19:10:56
|
|
Sorry I am new at asp. I tested with one insert field, I still get the
same error message.
------------------------------------------------
the code:
<%
cn="Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsv100"
Set rs = Server.CreateObject("ADODB.Recordset")
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandText = "Insert Into Food_Stamp_Applications "&_
"(Ethnicity_White) "&_
"values('"&request.form("Ethnicity_White") &"')"
objCommand.CommandType = adCmdText
objCommand.Execute
Set objCommand = Nothing
%>
--------------------------------------------------------------
> I double checked the insert statement and at times took it out to test.
> , I keep getting this same error message:
> Error Type:
> ADODB.Command (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
> /test/webscreen4.asp, line 14
>
>
> Could anyone out there see anything I missed?
> Thanks for helping,
> Ling
> --------------------------------------------------------
> My code is:
>
> cn="Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsv100"
> Set rs = Server.CreateObject("ADODB.Recordset")
> Set objCommand = Server.CreateObject("ADODB.Command")
>
> objCommand.ActiveConnection = strConnect
> objCommand.CommandText = "Insert Into Food_Stamp_Applications "&_
> "(Ethnicity_White, Ethnicity_Cambodian, Ethnicity_Korean, "&_
> "Ethnicity_Cantonese,Ethnicity_Mandarin,Ethnicity_Thai, "&_
> "Ethnicity_Vietnamese,Ethnicity_Other,PriLang_English, "&_
> "PriLang_Spanish,PriLang_Arabic,PriLang_Armenian, "&_
> "PriLang_Bengali,PriLang_Cambodian_Khmer,PriLang_Cantonese, "&_
> "PriLang_Chamorro,PriLang_Croatian,PriLang_Farsi, "&_
> "PriLang_Hindi,PriLang_Hmong,PriLang_Hungarian, "&_
> "PriLang_Japanese,PriLang_Korean,PriLang_Laotian, "&_
> "PriLang_Mandarin,PriLang_Russian,PriLang_Samoan, "&_
> "PriLang_Serbian,PriLang_Slovak,PriLang_Tagalog-Ceb-Ilo, "&_
> "PriLang_Thai,PriLang_Tongan,PriLang_Ukranian,PriLang_Urdu, "&_
> "PriLang_Vietnamese,PriLang_Other,Benefits_CalWorks, "&_
> "Benefits_CAPI,Benefits_GeneralRelief,Benefits_HealthFamilies, "&_
> "Benefits_MediCal,Benefits_SocialSecurity, "&_
> "Benefits_Unemployment,Benefits_Other,TotalMembers, "&_
> "EligibleMembers,Age60_Or_Over,TotalMonthlyIncome, "&_
> "TotalMonthlyExpenses_PartA, "&_
> "TotalMonthlyExpenses_PartB,TotalResources) "&_
> "values('"&request.form("Ethnicity_White") &"', "&_
> "'"&request.form("Ethnicity_Cambodian")&"', "&_
> "'"&request.form("Ethnicity_Korean")&"', "&_
> "'"&request.form("Ethnicity_Cantonese")&"', "&_
> "'"&request.form("Ethnicity_Mandarin")&"', "&_
> "'"&request.form("Ethnicity_Thai")&"', "&_
> "'"&request.form("Ethnicity_Vietnamese")&"', "&_
>
> "'"&request.form("Ethnicity_Other")&"', "&_
>
> "'"&request.form("PriLang_English")&"', "&_
>
> "'"&request.form("PriLang_Spanish")&"', "&_
>
> "'"&request.form("PriLang_Arabic")&"', "&_
>
> "'"&request.form("PriLang_Armenian")&"', "&_
>
> "'"&request.form("PriLang_Bengali")&"', "&_
>
> "'"&request.form("PriLang_Cambodian_Khmer")&"', "&_
>
> "'"&request.form("PriLang_Cantonese")&"', "&_
>
> "'"&request.form("PriLang_Chamorro")&"', "&_
>
> "'"&request.form("PriLang_Croatian")&"', "&_
>
> "'"&request.form("PriLang_Farsi")&"', "&_
>
> "'"&request.form("PriLang_Hindi")&"', "&_
>
> "'"&request.form("PriLang_Hmong")&"', "&_
>
> "'"&request.form("PriLang_Hungarian")&"', "&_
>
> "'"&request.form("PriLang_Japanese")&"', "&_
>
> "'"&request.form("PriLang_Korean")&"', "&_
>
> "'"&request.form("PriLang_Laotian")&"', "&_
>
> "'"&request.form("PriLang_Mandarin")&"', "&_
>
> "'"&request.form("PriLang_Russian")&"', "&_
>
> "'"&request.form("PriLang_Samoan")&"', "&_
>
> "'"&request.form("PriLang_Serbian")&"', "&_
>
> "'"&request.form("PriLang_Slovak")&"', "&_
>
> "'"&request.form("PriLang_Tagalog-Ceb-Ilo")&"', "&_
>
> "'"&request.form("PriLang_Thai")&"', "&_
>
> "'"&request.form("PriLang_Tongan")&"', "&_
>
> "'"&request.form("PriLang_Ukranian")&"', "&_
>
> "'"&request.form("PriLang_Urdu")&"', "&_
>
> "'"&request.form("PriLang_Vietnamese")&"', "&_
>
> "'"&request.form("PriLang_Other")&"', "&_
>
> "'"&request.form("Benefits_CalWorks")&"', "&_
> "'"&request.form("Benefits_CAPI")&"', "&_
> "'"&request.form("Benefits_GeneralRelief")&"', "&_
> "'"&request.form("Benefits_HealthFamilies")&"', "&_
> "'"&request.form("Benefits_MediCal")&"', "&_
> "'"&request.form("Benefits_SocialSecurity")&"', "&_
>
> "'"&request.form("Benefits_Unemployment")&"', "&_
> "'"&request.form("Benefits_Other")&"', "&_
> "'"&request.form("TotalMembers")&"', "&_
> "'"&request.form("EligibleMembers")&"', "&_
> "'"&request.form("Age60_Or_Over")&"', "&_
> "'"&cint(request.form("TotalMonthlyIncome"))&"', "&_
>
> "'"&cint(request.form("TotalMonthlyExpenses_PartA"))&"', "&_
>
> "'"&cin(request.form("TotalMonthlyExpenses_PartB"))&"', "&_
>
> "'"&cint(request.form("TotalResources"))&"')"
>
> objCommand.CommandType = adCmdText
> objCommand.Execute IntNoOfRecords
> Set objCommand = Nothing
> %>
Message #4 by David Cameron <dcameron@i...> on Fri, 14 Dec 2001 08:55:53 +1100
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C18420.F48C5C06
Content-Type: text/plain
Use Response.Write to check your value for request.form("Ethnicity_White").
In fact it is probably easier to write the entire INSERT statement to the
screen. I have said this before, but this should be your first step when you
get an ADO error.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Ling [mailto:linglinglee@h...]
Sent: Friday, 14 December 2001 5:11 AM
To: ASP Databases
Subject: [asp_databases] Re: asp access database insert help!
Sorry I am new at asp. I tested with one insert field, I still get the
same error message.
------------------------------------------------
the code:
<%
cn="Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsv100"
Set rs = Server.CreateObject("ADODB.Recordset")
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandText = "Insert Into Food_Stamp_Applications "&_
"(Ethnicity_White) "&_
"values('"&request.form("Ethnicity_White") &"')"
objCommand.CommandType = adCmdText
objCommand.Execute
Set objCommand = Nothing
%>
--------------------------------------------------------------
> I double checked the insert statement and at times took it out to test.
> , I keep getting this same error message:
> Error Type:
> ADODB.Command (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
> /test/webscreen4.asp, line 14
>
>
> Could anyone out there see anything I missed?
> Thanks for helping,
> Ling
> --------------------------------------------------------
> My code is:
>
> cn="Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsv100"
> Set rs = Server.CreateObject("ADODB.Recordset")
> Set objCommand = Server.CreateObject("ADODB.Command")
>
> objCommand.ActiveConnection = strConnect
> objCommand.CommandText = "Insert Into Food_Stamp_Applications "&_
> "(Ethnicity_White, Ethnicity_Cambodian, Ethnicity_Korean, "&_
> "Ethnicity_Cantonese,Ethnicity_Mandarin,Ethnicity_Thai, "&_
> "Ethnicity_Vietnamese,Ethnicity_Other,PriLang_English, "&_
> "PriLang_Spanish,PriLang_Arabic,PriLang_Armenian, "&_
> "PriLang_Bengali,PriLang_Cambodian_Khmer,PriLang_Cantonese, "&_
> "PriLang_Chamorro,PriLang_Croatian,PriLang_Farsi, "&_
> "PriLang_Hindi,PriLang_Hmong,PriLang_Hungarian, "&_
> "PriLang_Japanese,PriLang_Korean,PriLang_Laotian, "&_
> "PriLang_Mandarin,PriLang_Russian,PriLang_Samoan, "&_
> "PriLang_Serbian,PriLang_Slovak,PriLang_Tagalog-Ceb-Ilo, "&_
> "PriLang_Thai,PriLang_Tongan,PriLang_Ukranian,PriLang_Urdu, "&_
> "PriLang_Vietnamese,PriLang_Other,Benefits_CalWorks, "&_
> "Benefits_CAPI,Benefits_GeneralRelief,Benefits_HealthFamilies, "&_
> "Benefits_MediCal,Benefits_SocialSecurity, "&_
> "Benefits_Unemployment,Benefits_Other,TotalMembers, "&_
> "EligibleMembers,Age60_Or_Over,TotalMonthlyIncome, "&_
> "TotalMonthlyExpenses_PartA, "&_
> "TotalMonthlyExpenses_PartB,TotalResources) "&_
> "values('"&request.form("Ethnicity_White") &"', "&_
> "'"&request.form("Ethnicity_Cambodian")&"', "&_
> "'"&request.form("Ethnicity_Korean")&"', "&_
> "'"&request.form("Ethnicity_Cantonese")&"', "&_
> "'"&request.form("Ethnicity_Mandarin")&"', "&_
> "'"&request.form("Ethnicity_Thai")&"', "&_
> "'"&request.form("Ethnicity_Vietnamese")&"', "&_
>
> "'"&request.form("Ethnicity_Other")&"', "&_
>
> "'"&request.form("PriLang_English")&"', "&_
>
> "'"&request.form("PriLang_Spanish")&"', "&_
>
> "'"&request.form("PriLang_Arabic")&"', "&_
>
> "'"&request.form("PriLang_Armenian")&"', "&_
>
> "'"&request.form("PriLang_Bengali")&"', "&_
>
> "'"&request.form("PriLang_Cambodian_Khmer")&"', "&_
>
> "'"&request.form("PriLang_Cantonese")&"', "&_
>
> "'"&request.form("PriLang_Chamorro")&"', "&_
>
> "'"&request.form("PriLang_Croatian")&"', "&_
>
> "'"&request.form("PriLang_Farsi")&"', "&_
>
> "'"&request.form("PriLang_Hindi")&"', "&_
>
> "'"&request.form("PriLang_Hmong")&"', "&_
>
> "'"&request.form("PriLang_Hungarian")&"', "&_
>
> "'"&request.form("PriLang_Japanese")&"', "&_
>
> "'"&request.form("PriLang_Korean")&"', "&_
>
> "'"&request.form("PriLang_Laotian")&"', "&_
>
> "'"&request.form("PriLang_Mandarin")&"', "&_
>
> "'"&request.form("PriLang_Russian")&"', "&_
>
> "'"&request.form("PriLang_Samoan")&"', "&_
>
> "'"&request.form("PriLang_Serbian")&"', "&_
>
> "'"&request.form("PriLang_Slovak")&"', "&_
>
> "'"&request.form("PriLang_Tagalog-Ceb-Ilo")&"', "&_
>
> "'"&request.form("PriLang_Thai")&"', "&_
>
> "'"&request.form("PriLang_Tongan")&"', "&_
>
> "'"&request.form("PriLang_Ukranian")&"', "&_
>
> "'"&request.form("PriLang_Urdu")&"', "&_
>
> "'"&request.form("PriLang_Vietnamese")&"', "&_
>
> "'"&request.form("PriLang_Other")&"', "&_
>
> "'"&request.form("Benefits_CalWorks")&"', "&_
> "'"&request.form("Benefits_CAPI")&"', "&_
> "'"&request.form("Benefits_GeneralRelief")&"', "&_
> "'"&request.form("Benefits_HealthFamilies")&"', "&_
> "'"&request.form("Benefits_MediCal")&"', "&_
> "'"&request.form("Benefits_SocialSecurity")&"', "&_
>
> "'"&request.form("Benefits_Unemployment")&"', "&_
> "'"&request.form("Benefits_Other")&"', "&_
> "'"&request.form("TotalMembers")&"', "&_
> "'"&request.form("EligibleMembers")&"', "&_
> "'"&request.form("Age60_Or_Over")&"', "&_
> "'"&cint(request.form("TotalMonthlyIncome"))&"', "&_
>
> "'"&cint(request.form("TotalMonthlyExpenses_PartA"))&"', "&_
>
> "'"&cin(request.form("TotalMonthlyExpenses_PartB"))&"', "&_
>
> "'"&cint(request.form("TotalResources"))&"')"
>
> objCommand.CommandType = adCmdText
> objCommand.Execute IntNoOfRecords
> Set objCommand = Nothing
> %>
$subst('Email.Unsub').
Message #5 by "Ken Schaefer" <ken@a...> on Fri, 14 Dec 2001 18:30:29 +1100
|
|
www.adopenstatic.com/faq/800a0bb9.asp
My guess is adCmdText is not defined.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Ling" <linglinglee@h...>
Subject: [asp_databases] asp access database insert help!
: I double checked the insert statement and at times took it out to test.
: , I keep getting this same error message:
: Error Type:
: ADODB.Command (0x800A0BB9)
: Arguments are of the wrong type, are out of acceptable range, or are in
: conflict with one another.
: /test/webscreen4.asp, line 14
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #6 by gbrown@c... on Fri, 14 Dec 2001 09:29:33
|
|
Hi
What is strConnect? Should this be CN?
put a single apostrophe (') at the beginning of the line that says execute.
After the commandtext line put in
response.write objCommand.CommandText
I normally also end my SQL lines with a semi colon (;) inside the double
quotes.
It should say something like
Insert Into Food_Stamp_Applications (Ethnicity_White) values('Fred');
Where "Fred" is whatever value you submitted. This also assumes that
ethnicity_white is a character/string variable.
As Ken says make sure you have the line
<!-- METADATA TYPE="typelib"
FILE="c:\Program Files\Common Files\System\ado\msado15.dll" -
->
at the top of your code so things like adCmdText can be resolved.
Does that sort you?
Regards
Graham
>
> Sorry I am new at asp. I tested with one insert field, I still get the
> same error message.
> ------------------------------------------------
> the code:
> <%
> cn="Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsv100"
> Set rs = Server.CreateObject("ADODB.Recordset")
> Set objCommand = Server.CreateObject("ADODB.Command")
>
> objCommand.ActiveConnection = strConnect
> objCommand.CommandText = "Insert Into Food_Stamp_Applications "&_
> "(Ethnicity_White) "&_
> "values('"&request.form("Ethnicity_White") &"')"
>
> objCommand.CommandType = adCmdText
> objCommand.Execute
> Set objCommand = Nothing
> %>
|