Hi there,
I'm an Active Server Pages developer and currently I'm working in my first
Sybase project.


The thing is this :
I have a table (called table) with two fields :

ID : Numeric (5,0) Identity
Name : Varchar 20 Nulls Allowed

I'm using ASP to insert names to the table, and as far as I know it will
create the autonumeric sequence for the ID field (Ala MS Access), so far so

good...

When I query the database in order to display the names and the assigned
ID's I get the following error :

Microsoft OLE DB Provider for ODBC Drivers (0x80020009)
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

Now, this only happens when I try to retrieve th recordset weith the ID
value, if I only request the Name recordset I'll get no error!

Below is the code I'm Using :


1) To insert the name :

set conn=server.createobject("ADODB.Connection")
conn.Open "Driver={SYBASE SYSTEM
11};Srvr=ISSERVER;Uid=USERNAME;Pwd=PASSWORD;db=MYDATABASE;"
set rs=server.createobject("ADODB.Recordset")
rs.open "table",conn,1,3,2
rs.addnew
rs("name")="Juan"
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing


2) To query for the name and ID :
psql="select * from table order by id"
set rs=conn.execute(psql)
do until rs.eof
response.write rs("id") & "-" & rs("name")
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing



I'm really really stuck on this, and don't know what it's going on
If there's someone out there who can help I'll really , really appreciate
it.

Please e-mail me at:
consultamelo@hotmail.com

I'm running ASE 11 on Win2000 machine, IIS 5

Thanks a lot