| |
imav8n
Posts: 95
Score: 0
Joined: 7/3/2001
From: USA
Status: offline
|
I'm trying to use the objRecordSet.Fields.append method to add a new field to a database table. I'm successfully connecting to the database via ODBC, and I've got appropriate permissions on the files. In fact, this is not an .asp page, but is a stand-alone .vbs that is running on the same server as the database (MS Access) is housed on. Has anyone else done this before successfully? I keep getting this error: Error: Operation is not allowed in this context. Code: 800A0C93 Source: ADODB.FIELDS This is the code I'm using: Set objconn = CreateObject("ADODB.Connection") objconn.ConnectionString = "DSN=DitSize" objconn.ConnectionTimeout = 0 objconn.open Set objRs = CreateObject("ADODB.Recordset") Set objRs.ActiveConnection = objConn objRs.CursorType = adOpenDynamic objRs.Open "DITsz", , , , adCmdTable objRS.Fields.append "new", adDouble objRS.Fields.update wscript.echo "Done!" objRS.close Set objRS = nothing objConn.close Set objConn = nothing Anybody have any idea on what I'm doing wrong??? THANKS!!!!! ~imav8n Failure is not an option.....it comes bundled with the software.
|
|