Hi,
I am trying to add a new record to a main page. This page is the processing
page to a form. However, I am getting the following error message:
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/gwisnewcon/test/successconfirma tion_ori.asp, line 41
Line 41 is : rs1.Open "Main", 2, 2
Any help for the resolution is appreciated. Thanks
CODE:
<%@ Language = "VBScript"% >
<!-- #include file="adovbs.in c" -->
<%
Response.Buffer = true
'Declare all local variables
dim CN
dim RS
dim rs1
dim strSQL
'set a local variable to my DSN-less connection String
strconn = "DRIVER=Microso ft Access Driver
(*.mdb);DBQ=C:\ _______GWISNEWC ON\greytest.mdb "
'Verify user information in the database
'Create the connection and recorset objects, set the SQL String and parameters
'and open recordset
myDSN="DRIVER={ Microsoft Access Driver (*.mdb)}; "
myDSN=myDSN & "DBQ=C:\_______ GWISNEWCON\grey test.mdb"
set CN=server.creat eobject("ADODB. Connection")
set RS=server.creat eobject("ADODB. Recordset")
set rs1 = server.createob ject("adodb.rec ordset")
CN.Open myDSN
RS.ActiveConnec tion=CN
rs1.ActiveConne ction = CN
strSQL = "SELECT Main.IDNumber, Main.SocialSecu rityNumber, Main.Password,
Main.FirstName, Main.LastName, Main.ColorPrefe rence, Main.FoodPrefer ence,
Main.FinalUpdat e FROM Main where " & _
"SocialSecurity Number ='" & Request.Form("t xtSocialSecurit y") & "'"
RS.Open strSQL
'Response.Write strSQL
'Check for empty recordset which indicates user information was not found
If RS.EOF or RS.BOF Then
'This statement opens the table so we can add a record notice the addnew
'The 2, 2 is how the table is opened there are many ways it can be opened
rs1.Open "Main", 2, 2
'Use the addnew method of the recordset object to add a record
rs.addnew
'Set the table column = to my input text box from my form
rs("SocialSecur ityNumber") = Request.Form("t xtSocialSecurit y")
rs("FirstName" ) = Request.Form("t xtFirstName")
rs("LastName") = Request.Form("t xtLastName")
rs("ColorPrefer ence") = Request.Form("t xtColorPref")
rs("Password") = Request.Form("t xtPassword")
rs("FoodPrefere nce") = Request.Form("t xtFoodPref")
rs("FinalUpdate ") = CInt(Request.Fo rm("chkFinalUpd ate"))
rs.update
Response.Write "<font color = ""teal"">"
Response.Write "Process successful. Your record has been added to our
database."
Response.Write "</font>"
Else
'Dispaly error message
Response.Write "<font color = ""teal"">"
Response.Write "Data exists corresponding to your input social security."
Response.Write "<br>"
Response.Write "Please check your social security number and try again."
Response.Write "</font>"
'set objects to nothing to clear out memory
CN.Close
rs.Close
rs1.Close
set RS= nothing
set rs1= nothing
set conn = nothing
End If
%> 1 2947
<normal blurbs here about ADODB.Recordset , ODBC, etc. that you've heard a
thousand times before. :] >
Try bracketing Password as such:
strSQL = "SELECT Main.IDNumber, Main.SocialSecu rityNumber, Main.[Password],
Main.FirstName, Main.LastName, Main.ColorPrefe rence, Main.FoodPrefer ence,
Main.FinalUpdat e FROM Main where " & _
"SocialSecurity Number ='" & Request.Form("t xtSocialSecurit y") & "'"
Ray at home
"Jack" <Ja**@discussio ns.microsoft.co m> wrote in message
news:6B******** *************** ***********@mic rosoft.com... strSQL = "SELECT Main.IDNumber, Main.SocialSecu rityNumber, Main.Password, Main.FirstName, Main.LastName, Main.ColorPrefe rence, Main.FoodPrefer ence, Main.FinalUpdat e FROM Main where " & _ "SocialSecurity Number ='" & Request.Form("t xtSocialSecurit y") & "'" RS.Open strSQL 'Response.Write strSQL
'Check for empty recordset which indicates user information was not found If RS.EOF or RS.BOF Then This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: J. Muenchbourg |
last post by:
I'm getting an "Arguments are of the wrong type, out of acceptable
range, in conflicts with each other " error , pointing to the sql
statement in this block:
Dim rstime
Set rstime = Server.CreateObject("ADODB.Recordset")
rstime.Open "SELECT * FROM TimestarResorts where resortname='" &
request.querystring("resortname") & "' and roomsize='" &
request.querystring("roomsize") & "'", dsn, 1, 3
|
by: Tim Gaunt |
last post by:
Hi,
I'm hoping that someone will be able to help me with this one, I'm
developing an application which basically inserts a load of data into the
database ready for validation at a later date, I wrote an INSERT statement
that works fine however today I decided that as part of the application
upgrade it should be return the record ID so I wrote the following which I
admit is a little messy at places but it works. However when I added all...
|
by: Erica |
last post by:
I'm getting the following error:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/shop/results.asp, line 15
line 15 is the recordset open line. Can someone please help
|
by: the other john |
last post by:
Here's my project info first...
DB: Access 2000
server: IIS 2003
Here is the error I'm getting...
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
|
by: Edward |
last post by:
I have a wrapper function for executing a SQL Server Stored Procedure
that returns no records:
Public Function modRunStoredProc(vstrSPName As String, ParamArray
vvarParams() As Variant) As Variant
On Error GoTo modRunOutputStoredProc_Err
Dim cmd As Command
Dim intIndex As Integer
| |
by: iam247 |
last post by:
Hi
I have a web page which receives information from a form (using
request.form) and also attempts to look at an Access query to read in
recoeds to a variable named rsGroup.
When I have the following line commented, so it does not activate, I
can successfully print all of the response.write's below:
rsGroup.Open strSQL, adoCon
|
by: anantraoneel |
last post by:
Hi Friend
My project is a Library System.
In Project is Book Master form. If I've select Book Type from Type Master and Publication from Publication Master then this error has come:
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. "
but if I've put amount manually and save the record then record has been successfully saved.
For selection of Book Type and Publication I've used Combo...
|
by: thecubemonkey |
last post by:
Hi everyone,
I'm getting the following error:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are
in conflict with one another.
/newsite/faq.asp, line 57
Can you look at the code below and let me know if the problem is my
|
by: gforgourav |
last post by:
'Arguments are of wrong type, are out of acceptable range, or are in conflict with one another'
this error occurs ...
i m using vb.net 2005 with sql server 2000 backend
i had a project in vb 6.0 with MS access
i hav converted it to vb.net 2005 and hav made all necessary changes in code
now as the project was in vb 6.0 it has adodb recordset for fetching data from table
now whn i m using sql server connection string i get this error..
my...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |