Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Old Access (.mdb)
-
- Posts: 10
- Joined: Fri Jun 29, 2012 10:08 am
-
- Posts: 10
- Joined: Fri Jun 29, 2012 10:08 am
Re: Old Access (.mdb)
I modified A2N2000.mdb for initial errors in my system.
Module: NuFunctions
And DAO.Recorset
Form: Converter (problem with create file)
Module: NuFunctions
Code: Select all
Function makeObjectTable(pFormName As String, pNewTable As Boolean)
...
'DoCmd.RunSQL "INSERT INTO nuObjects (ob_form, ob_name, ob_type, ob_label, ob_top, ob_left, ob_primary, ob_foreign, ob_datatype, ob_tabindex) VALUES (" & Join(V, ",") & ")"
strSQL = "INSERT INTO nuObjects (ob_form, ob_name, ob_type, ob_label, ob_top, ob_left, ob_primary, ob_foreign, ob_datatype, ob_tabindex) VALUES (" & Join(V, ",") & ")"
CurrentDb.Execute strSQL
...
Code: Select all
Function buildTableSQL(pTableName As String) As String
...
'==========INSERT RECORDS
Dim rst As DAO.Recordset, atLeastOneRecord As Boolean
ReDim RW(0 To 0) As String
...
Function addForm(pAccessFormName As String)
...
'----add browse fields
Dim rst As DAO.Recordset, rCount As Integer
...
Function buildFormObjects(pFormID, pAccessFormName As String, pIsSubform As Boolean)
Dim rst As DAO.Recordset, rCount As Integer
...
Code: Select all
Private Sub write_to_file()
Const ForReading = 1, ForAppending = 8
Const TriStateUseDefault = -2, TriStateTrue = -1, TriStateFalse = 0
'
Set fs = CreateObject("Scripting.FileSystemObject")
pPath = InputBox("Save To :", , "c:\" & Format(Now(), "hhnnss") & ".sql")
Set A = fs.CreateTextFile(pPath, True)
A.Close
'Open pPath For Output As #1
Set A = fs.opentextfile(pPath, ForAppending, TriStateUseDefault)
build_tables
build_reports
build_forms
SQLstring = SQLstring & vbCrLf & "DROP TABLE IF EXISTS nu_temp_table;" & vbCrLf
SQLstring = SQLstring & vbCrLf & "CREATE TABLE nu_temp_table (nu_temp_table_id text(100), ntt_code text(100), ntt_description text(100));" & vbCrLf
SQLstring = SQLstring & vbCrLf & "DELETE FROM nu_temp_table;" & vbCrLf
SQLstring = SQLstring & vbCrLf & "INSERT INTO nu_temp_table (nu_temp_table_id, ntt_code, ntt_description) VALUES ('1234', 'unknown table name', 'unknown table name');" & vbCrLf
'Print #1, SQLstring
A.Write SQLstring
'Close #1
A.Close
Exit Sub
ErrorHandler:
MsgBox vbObjectError
End Sub
- Attachments
-
- A2N2000_modif.zip
- A2N2000 modif
- (22 Bytes) Downloaded 1394 times