Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error adding records

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-29 : 09:41:25
Cindy writes "We are unable to add new record in a table where we have defined the seed value. I have made up a example below to show you the problem we are having, Your cooperation is needed desperately.
----------------table structure ---------------
In a Sql database table
column name= id ,Datatype = integer , length=4 ,precision=10, allownull=not checked , identity=check marked ,
identity seed = 1 , identity increment=1
-------------------------------------------------------
I wanted SQl to insert value in id field by autoincrement.
id field is structured to add by sed value as mentioned in my earlier message

************Error we get*********
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/o/problem/receive.asp, line 15
************************************

************Actual coding of recieve.asp below is line# 1*******
@ Language=VBScript
response.buffer=true
dim con
set con=server.createobject("ADODB.connection")
con.open application("mydsn")
...
Sender=request.form("T1")
set rs=server.createobject("ADODB.recordset")
sql="select * from subemail "
rs.open sql,con,4,3
rs.addnew
rs("email")=sender
rs("ipenter")=request.servervariables("REMOTE_ADDR")
rs("cdate")=date()
rs.update


*****error we got is on the line 15 where it says :
rs.open sql,con,4,3
*************

------------------
This is latest error update of my yesterday messages at : http://www.aspmessageboard.com/forum/databases.asp?M=246520&P=1&F=21
--------------------------
********
(mydsn): we have defined in global.asa this connection and gave the name of the database to connect to for dsn less connections.
*********

why i am geting problem in my line 15 what is the problem with above coding. This problem is not solved on 4guysfromrolla.com
http://www.aspmessageboard.com/forum/asp.asp?M=246667&F=20&P=1
& expert-resources.com if you at sqlteam.com can solve it , i will be a slave for you guys.

any geek wanna help plz.


Please help, desperado.
Mucho Gracias
Cindy

"
   

- Advertisement -