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
 Other Forums
 Other Topics
 Using ASP to insert/delete/add data to a db2 table on an as400...Can it be done?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-05 : 09:14:56
Ryan writes "I'm needing to know how to add/update/insert/delete data from an as400 db2 database. I know this is not your favorite subject, but ANY help would be great! Here is what I have:

Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.Open "DSN=Web400;UID=SYSTEM;PWD=SYSTEMBGE"
OBjdbConnection.CommandTimeout=0
SQLQuery = "SELECT * FROM BIGG.RMDB ORDER BY BIGG.RMDB.ID"
Set objRecordset = OBJdbConnection.Execute(SQLQuery)

objRecordset.AddNew

........

Here is what I get:

Error Type:
ADODB.Recordset (0x800A0CB3)
Object or provider is not capable of performing requested operation.
/intranet/as400/progs/rm/db_add.asp, line 8

......

My DSN is Web400 obviously and the connection works fine. The problem comes when trying to AddNew. If I can't do it this way, then how?


Thanks for your help!"
   

- Advertisement -