Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim file1 As FolderItem
- Dim file2 as folderitem
- Dim db1 as new RealSQLDatabase
- Dim db2 As New RealSQLDatabase
- file1 = GetFolderItem( textfield1.text )
- file2 = GetFolderItem( textfield2.text )
- If file1 <> Nil and file2 <> Nil Then
- db1.DatabaseFile = file1
- db2.DatabaseFile = file2
- If db1.Connect and db2.Connect Then
- Dim res1 as RecordSet
- Dim res2 as RecordSet
- res1 = db1.SQLSelect("SELECT * FROM sqlite_master WHERE type='table';")
- res2 = db2.SQLSelect("SELECT * FROM sqlite_master WHERE type='table';")
- listbox1.deleteallrows
- Dim res3 as RecordSet
- Dim res4 as RecordSet
- Dim appoggio as String
- dim appoggio2 as string
- if res1 <> Nil and res2 <> nil then
- While not res1.eof and not res2.eof
- try
- listbox1.addrow(res1.field("name").stringValue , res2.field("name").stringvalue)
- listbox1.addRow("------------------" , "------------------")
- appoggio = res1.field("name").stringValue
- appoggio2 = res2.field("name").stringValue
- res3 = db1.SQLSelect("PRAGMA table_info(" + appoggio+ ")")
- res4 = db2.SQLSelect("PRAGMA table_info(" + appoggio2 + ")")
- While not res3.eof and not res4.eof
- appoggio = res3.field("name").stringValue + " (" + res3.field("type").stringValue + ")"
- appoggio2 = res4.field("name").stringvalue + " (" + res4.field("type").stringValue + ")"
- listbox1.addrow(appoggio , appoggio2)
- res3.movenext
- res4.movenext
- wend
- listbox1.addRow("------------------" , "------------------")
- res1.movenext
- res2.MoveNext
- catch NilObjectException
- Msgbox "Ci Sono dei valori nulli!"
- end try
- wend
- else
- MsgBox("Uno dei due risultati è vuoto!")
- End if
- res1 = db1.SQLSelect("PRAGMA table_info(utente)")
- res2 = db2.SQLSelect("SELECT * FROM sqlite_master WHERE type='table';")
- listbox1.deleteallrows
- if res1 <> Nil and res2 <> nil then
- While not res1.eof and not res2.eof
- try
- listbox1.addrow(res1.field("name").stringValue , res2.field("name").stringvalue)
- res1.movenext
- res2.MoveNext
- catch NilObjectException
- Msgbox "Ci Sono dei valori nulli!"
- end try
- wend
- else
- MsgBox("Uno dei due risultati è vuoto!")
- End if
- Else
- MsgBox("Errore Database1: " + db1.ErrorMessage)
- MsgBox("Errore Database2:" + db2.errormessage)
- End If
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement