Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel and AS400 DB2 database

Hy Excel Experts !

I need to export data from excel to AS400 DB2 file database.
I have full right on the library file.

I always got the following error message:

"3251 Current Recordset does not support updating. This may be a limitation
of the provider, or the selected locktype"


Thanks for your help!!
Experanza




'================================================= ===
Voici le code :
Dim rsTables As Recordset
Dim strSelect, strPassWord400
Set conn = New ADODB.Connection
Dim nbrRecords, NoLigne, index As Integer


strPassWord400 = InputBox("Veullez entrez votre mot de passe 400")

conn.Open "Provider=IBMDA400;Password=" & strPassWord400 & ";User
ID=COCO;Data Source=tttt.cccc.qc.ca;Transport Product=Client
Access;SSL=DEFAULT"


Set rsTables = New ADODB.Recordset

On Error GoTo Exportation_ERR

rsTables.Open "COCO.FILE", conn, adOpenKeyset, adLockOptimistic,
adCmdTable

'================================================= =================
'TEST D'ECRITURE DANS LE FICHIER 400
'================================================= ================


For NoLigne = 2 To 10

rsTables.AddNew
rsTables!EMPNUM = ActiveSheet.Range("A" + CStr(NoLigne))
rsTables!LUN = ActiveSheet.Range("B" + CStr(NoLigne))
rsTables!MAR = ActiveSheet.Range("C" + CStr(NoLigne))
rsTables!MER = ActiveSheet.Range("D" + CStr(NoLigne))
rsTables.Update
Next

Exit Sub

Exportation_ERR:
MsgBox (Err.Number & " " & Err.Description)

End Sub




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
as400 ayeFayze Excel Discussion (Misc queries) 1 April 20th 05 09:12 AM
Function To Return Info From As400 Database Robin Flores Excel Programming 0 October 21st 04 08:59 PM
DDE to Query AS400 DB Joseph[_26_] Excel Programming 0 February 9th 04 10:46 PM
AS400 Date value conversion to Excel D.S.[_3_] Excel Programming 5 December 4th 03 01:02 PM
SQL against AS400 R. Choate Excel Programming 4 November 7th 03 09:11 PM


All times are GMT +1. The time now is 02:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"