473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need Help about inserting record in Access DATABASE

Hi friends here is my coding.. but i m facing one problem .. i used both mathod SQL mathod and open Record Set. but in both i m getting error massage can anyone help me out regarding thi.

Please Please Please help me out how i can solve this problem.


Error :
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/grc/registration.asp, line 85



Coding :
<%
dim conn, connstring
dim errdc,QSql,Qval
dim DataSuccess
dim UNameTT,PassTT,FNameTT,LNameTT, EmailTT,AgeTT,GenderTT,Address1TT,Address2TT,CityT T,StateTT,CountryTT,PhoneTT,MobileTT,FaxTT

set conn = server.createobject("ADODB.connection")
connstring = "provider = microsoft.jet.OLEDB.4.0; data source = " & server.mappath("data.mdb")
conn.open = connstring
UNameTT = request.form("Uname")
PassTT = request.form("PassT")
FNameTT =request.form("Fname")
LNameTT = request.form("LName")
EmailTT = request.form("EmailT")
AgeTT = request.form("AgeT")
GenderTT = request.form("Gender")
Address1TT = request.form("Address1")
Address2TT = request.form("Address2")
CityTT = request.form("CityT")
StateTT = request.form("StateT")
CountryTT = request.form("CountyT")
PhoneTT = request.form("phoneT")
MobileTT = request.form("MobileN")
FaxTT = request.form("FaxT")

set rs = server.CreateObject("adodb.recordset")
rs.Open "SELECT * from users",Conn,adOpenKeyset, adLockPessimistic, adCmdText
rs.addnew
rs.fields("UserName") = UnameTT
rs.fields("Password") = PAssTT
rs.fields("FName") = FnameTT
rs.fields("LName") = LNameTT
rs.fields("Email") = EmailTT
rs.fields("Age") = AgeTT
rs.fields("Gender") = GenderTT
rs.fields("Address1") = Address1TT
rs.fields("Address2") = Address2TT
rs.fields("City") = CityTT
rs.fields("State") = StateTT
rs.fields("Country") = CountryTT
rs.fields("Phone") = PhoneTT
rs.fields("Mobile") = MobileTT
rs.fields("Fax") = FaxTT
rs.update

' Method 2 using excute SQL command but error : Syntex Error in INSERT INTO
'set rs = conn.execute ("INSERT INTO Users (UserName, Password, Fname, LName, Email, Age, Gender, Address1, Address2, City, State, Country, Phone, Mobile, Fax) VALUES ('" & UNameTT & "','" & PassTT & "','" & FNameTT & "','" & LNameTT & "','" & EmailTT & "'," & AgeTT & ",'" & GenderTT & "','" & Address1TT & "','" & Address2TT & "','" & CityTT & "','" & StateTT & "','" & CountryTT & "','" & PhoneTT & "','" & MobileTT & "','" & FaxTT & "');")

' Method 2 using open SQL command but error : Syntex Error in INSERT INTO

'rs.open "Insert into Users(UserName,Password,Fname,LName,Email,Age,Gend er,Address1,Address2,City,State,Country,Phone,Mobi le,Fax) VALUES('UNameTT','PassTT','FNameTT','LNameTT','mai lTT',55,'GenderTT','Address1TT','Address2TT','City TT','StateTT','CountryTT','PhoneTT','MobileTT','Fa xTT')",conn

end if
rs.close
set rs = nothing
conn.close
set conn = nothing
end if
May 20 '07 #1
3 1856
jhardman
3,406 Expert 2GB
set rs = server.CreateObject("adodb.recordset")
rs.Open "SELECT * from users",Conn,adOpenKeyset, adLockPessimistic, adCmdText
rs.addnew
rs.fields("UserName") = UnameTT
rs.fields("Password") = PAssTT
rs.fields("FName") = FnameTT
rs.fields("LName") = LNameTT
rs.fields("Email") = EmailTT
rs.fields("Age") = AgeTT
rs.fields("Gender") = GenderTT
rs.fields("Address1") = Address1TT
rs.fields("Address2") = Address2TT
rs.fields("City") = CityTT
rs.fields("State") = StateTT
rs.fields("Country") = CountryTT
rs.fields("Phone") = PhoneTT
rs.fields("Mobile") = MobileTT
rs.fields("Fax") = FaxTT
rs.update
In this method, where is the error generated? It should come on a specific line.
Jared
May 21 '07 #2
Thanks buddy.. i solved this problem it was problem with my iis server i just put rights for internet guest user to write date access and its solved. coz there is no mistak in my script just server didnt allow users to wirte access. thankx anyways..
May 25 '07 #3
jhardman
3,406 Expert 2GB
I'm glad you solved the problem. Thanks for posting your solution.

Jared
May 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ryan Wagner | last post by:
I am doing many SQL insert statements to insert records into an oracle database. I need the order of the records, after inserting all records, to be the same as the order I inserted them in. Right...
1
by: Erica | last post by:
Hi, I have searched everywhere, and I can't seem to find the answer to my problem. I am trying to write a very simple piece of ASP code to insert a record into a field in a database. Ultimately...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
2
by: Shapper | last post by:
Hello, I am trying to insert a record in an Access database using Asp.Net/Vb.Net. I am getting the error: "Operation must use an updateable query." How can I solve this problem? The code...
11
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
7
subashini Thiyagarajan
by: subashini Thiyagarajan | last post by:
Hi , In ASP how to deactivate few fields while inserting a record to the database(access). i want to insert a record.e.g having 5 fields.it is not reqired to fill all the fields in a form as...
5
by: bob44 | last post by:
Hi, I recently created a mysql database using phpmyadmin. I then proceeded to make a form to insert data into the database, but the problem is that the form is only able to insert one record, and...
11
by: richardkreidl | last post by:
I'm trying to check for duplicates before I do an INSERT into the Access database table. I basically want to alert the user if the 'ProjectName' and the 'MileStones' are already in the table.. ...
6
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the...
2
by: hakkatil | last post by:
Hi to all, I have a page that inserts excel sheet to access database. I am using asp. What I want to do is to check the inserting record if it is in the database. Basicly checking the dublicate...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.