hi! i have a front-end database (MS ACCESS 97) with a Memo Field and i'm having a problem
transferring the records to an Oracle (8.1.6) database using VB-ADO. The error that i'm
getting is "ORA-01704:String Literal Too Long". This might be because of the Memo field which
i'm trying to upload to my server which has a LONG datatype.
any ideas?Code:Dim DTSws As Workspace Dim DTSdb As Database Dim DTStbDocumentList As Recordset Dim rstDocumentList As New ADODB.Recordset Dim cConnStr As String Dim cSQL as string Dim slRecordsAffected As String On Error GoTo ErrorHandler Set DTSws = DBEngine.Workspaces(0) Set DTSdb = DTSws.OpenDatabase(cDefaultDirectory + cDefaultFilename, False, False, cDatabaseConnect) Set DTStbDocumentList = DTSdb.OpenRecordset("DocumentList", dbOpenTable) cConnStr = "Provider=MSDAORA;Data Source=dostdb;User ID=DEV_DTS;Password=developer01" Set cnDatabase = New ADODB.Connection cnDatabase.Open cConnStr cnDatabase.Errors.Clear cnDatabase.BeginTrans DTSws.BeginTrans DTStbDocumentList.MoveFirst Do While Not DTStbDocumentList.EOF cSQL = "Insert Into DocumentList" + _ "(DocumentCode,Subject,Remarks) " + _ "Values ('" + _ DTStbDocumentList("DocumentCode")) + "'," + _ DTStbDocumentList("Subject")) + "'," + _ DTStbDocumentList("Remarks")) + "')" cnDatabase.Execute cSQL, slRecordsAffected . . .
thanks




Reply With Quote