Expand|Select|Wrap|Line Numbers
- Dim con1 As ADODB.Connection
- Dim con2 As ADODB.Connection
- Dim recSet1 As ADODB.Recordset
- Dim recSet2 As ADODB.Recordset
- Set con1 = CurrentProject.Connection
- Set con2 = CurrentProject.Connection
- Set recSet1 = New ADODB.Recordset
- Set recSet2 = New ADODB.Recordset
- recSet1.CursorLocation = adUseClient
- recSet1.Open "tblElements", con1, adOpenKeyset, adLockOptimistic
Expand|Select|Wrap|Line Numbers
- Function FILESYS_GetObject()
- Set FILESYS_GetObject = CreateObject("Scripting.FileSystemObject")
- End Function
- Function File_FileCreate(filePath3)
- Set FileSys = FILESYS_GetObject()
- Create = True
- ForWriting = 2
- Set FileStream = FileSys.CreateTextFile(filePath3, 2, False)
- End Function
- Function FILE_WriteAll(filePath3, ElementC)
- ForAppending = 8
- Create = True
- Set FileSys = FILESYS_GetObject()
- If FILESYS_GetObject.FileExists(filePath3) = False Then
- File_FileCreate (filePath3)
- End If
- Set FileStream = FileSys.OpenTextFile(filePath3, ForAppending, False)
- FileStream.Write (ElementC)
- FileStream.Close
- End Function
After writing to the file I run the following to clear recordset1:
Expand|Select|Wrap|Line Numbers
- recSet1.AddNew
- DoCmd.OpenQuery ("ClearTableElements")
- recSet1.Update
If not...can I close the recordset and then re-open it to run this query?
Also - the data I'm recording is separated into segments and elements. The elements are the different parts of the segments...but I am running into character limitations with using text fields in access.
The truth is that it would be easier and faster for the program to read by the elements, but write by the segment - the problem is that I have to store a lot of segments and I was not sure on what limitations exist for arrays.... I was hoping someone could provide me with information on the limitations of what I can store in each value of an array and any other limitations that exist.
Any help would be greatly appreciated. Thanks!