het probleem is als volgt.
we hebben een macro in Excel die file exporteerd naar een access database. maar om 1 of andere vage reden werkt het niet, maar hij geeft ook geen errors.
we hebben er messageboxes ingedaan om te checken wat hij wel en niet doet.
de msgboxes op regel 24 en 31 laat hij zien maar de rest slaat hij helemaal over..
we hebben een macro in Excel die file exporteerd naar een access database. maar om 1 of andere vage reden werkt het niet, maar hij geeft ook geen errors.
we hebben er messageboxes ingedaan om te checken wat hij wel en niet doet.
de msgboxes op regel 24 en 31 laat hij zien maar de rest slaat hij helemaal over..
ASP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
| Function ORD_ExtoDb(ordnum) ' ADODB Constanten '---- CursorTypeEnum Values ---- Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 '---- LockTypeEnum Values ---- Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adLockBatchOptimistic = 4 '---- CommandTypeEnum Values ---- Const adCmdUnknown = &H8 Const adCmdText = &H1 Const adCmdTable = &H2 Const adCmdStoredProc = &H4 Const adCmdFile = &H100 Const adCmdTableDirect = &H200 MsgBox ("Exto:" & ordnum) y = 1 Do While Range("A" & y) <> "" y = y + 1 Loop AantalRegels = CInt(y - 1) MsgBox ("aant:" & AantalRegels) DSN_CONN_STRING = "DRIVER={Microsoft Access Driver (*.mdb)}; " DSN_CONN_STRING = DSN_CONN_STRING & "DBQ=C:\GeleKaartExport\" & Date & "\" & Date & "_ORD_" & ordnum & ".mdb" Dim RS Set RS = CreateObject("ADODB.Recordset") RS.Open "OrderNummer", DSN_CONN_STRING, adOpenKeyset, adLockPessimistic, adCmdTable RS.CacheSize = 25 MsgBox ("Exto2:" & ordnum) x = 2 Do While x <= (AantalRegels + 1) RS.AddNew MsgBox ("Exto3:" & ordnum) RS.Fields("InvoerDatum") = Range("B" & x) RS.Fields("Opdrachtgever") = Range("C" & x) 'RS.Fields("Supervisor_HU") = Supervisor_HU 'RS.Fields("Contactpersoon") = Contactpersoon Loop MsgBox ("Exto4:" & ordnum) RS.Update RS.Close Set RS = Nothing End Function |
Bier, Whiskey en Metal!!