This is a discussion on Can't add new record to ODBC in Outlook Form vbscript within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hi! I'm trying to add a new line to a Database table via odbc from an outlook form to ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi! I'm trying to add a new line to a Database table via odbc from an outlook form to a MS SQL Server. Read access works great, and I'm able to add data from a odbc-linked table in Access, so the DSN configuration works. Here's my vbscript: Dim Dbe Dim MyDB Dim Rs Set Dbe = Application.CreateObject("DAO.DBEngine.36") Set MyDB = Dbe.workspaces(0).OpenDatabase("SQLDSN",_ 0,0,"ODBC;DATABASE=DBNAME;DSN=SQLDSN") Set Rs = MyDB.OpenRecordset("TableName") Rs.MoveLast Rs.AddNew Everything goes well up to the AddNew. There I get a error message saying Unable to update; Database or object is read-only. (actually I get the german error message "Aktualisieren nicht möglich; Datenbank oder Objekt ist schreibgeschützt.", I tried to translate as good as I can) The line of the error is the Rs.AddNew-Command. Can anybody tell me what's wrong with my script? -- Marco Dieckhoff icq# 22243433 GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys |