SQLitening Support Forum

Support Forums => You've got Questions? We've got Answers! => Topic started by: D. Wilson on October 24, 2008, 11:11:00 PM

Title: VB6 Compatbility
Post by: D. Wilson on October 24, 2008, 11:11:00 PM
I would like to take a moment and provide my opinion on VB compatibility.

I wrote a program in VB that allows me to very quickly create software for my customers. I create my database, tell what kind of controls I want to link to  the database fields and I press one button and the program creates the forms and all the supporting code (to save/load data). I simply open the created form move the controls around and verify the code . I utilize Farpoint?s Spread control as a grid control. I also created a report builder that creates end user reports off the same information. The bottom line is VB6 has become a very quick way for me to create software for my clients.

I was never fan of Microsoft?s  databases. I always preferred a lean simple approach. Like many of you  I have used Tsunami. I liked the interface and I licensed the TTDS server. The major issues that I had with Tsunami were lack of a SQL language and doing record updates seemed a little slow using the server.

When I came across SQLitening I felt it was the answer to my problems.There are very few SQLite servers available. SQLitening provides a very simply way to allow multiuser access to SQLite databases. It is very easy to deploy and very simply configuration. The ability to provide remote access to the database is a great plus. I have several existing programs that I would like to modify to utilize SQLitening. Rather than doing complete rewrites ? these programs can very quickly be converted over to utilize SQLitening.

I agree the Power Basic is an excellent programming language. The only issues I have
1) I utilize  several active controls that I need to verify it would work with PB
2) Time- It is going to take time to learn PB

There is no free lunch. Personally I would have no problem paying for a DLL (or  paying for membership to this forum). I do not know what is involved in providing a bridge between SQLitening and VB.  But personally I feel providing a bridge between the two would be a benefit to the few of us who still utilize VB while transiting to PB.
Title: Re: VB6 Compatbility
Post by: Fred Meier on October 25, 2008, 07:45:55 AM
I would be happy to wirte a bridge Dll if you would be the tester.  Is the only requirement of the bridge to eliminate the byval string parm passing?
Title: Re: VB6 Compatbility
Post by: D. Wilson on October 25, 2008, 12:28:49 PM
Thank you for your willingness to look at this issue.

What about the asciiz Data Type ??

If possible - I think this dll should have all the calls similiar to the SQLitening DLL just a different prefix; ie VBSel,VBConnect.
This would allow it to be maintained allong with the SQLitening DLL. Additionally by having this DLL would help isolate VB errors and changes can be made to this DLL rather than the SQLitening DLL.


Title: Re: VB6 Compatbility
Post by: Fred Meier on October 25, 2008, 04:59:49 PM
Removing all byval strings also eliminates the asciiz data types.
Title: Re: VB6 Compatbility - New Declares 1.10
Post by: Matt Humphreys on November 07, 2008, 05:49:33 PM
With the new delares for vb, I find have the commands are now suffixed with 'VB'.
I chop and change between vb and pb whilst I learn pb.
My brain was getting used to the PB names and so I have modified the delares with alias to keep the command structure consistent. Seems to work ok.
if it's of use to anyone I post it here.

Attribute VB_Name = "SQLiteningVB"
'  ====================================================================
'  |                                                                  |
'  | SQLitening Include                                               |
'  |                                                                  |
'  ====================================================================
'  ====================================================================
'  PUBLIC DOMAIN SOFTWARE
'  The author or authors of this code dedicate any and all
'  copyright interest in this code to the public domain.
'  Anyone is free to copy, modify, publish, use, compile,
'  sell, or distribute the original code, either in source
'  code form or as a compiled binary, for any purpose,
'  commercial or non-commercial, and by any means.
'  Fred Meier - November 2008
'  ====================================================================

'===========================<[ Constants ]>============================
Const SQLite_OK = 0        'Successful result
Const SQLite_Busy = 5      'Database is locked
Const SQLite_Dups = 19     'Constraint violation.  Normally caused by
                           'trying to add a non unique key to an index
                           'during an Insert or Update.

'============================<[ Declares ]>============================
Declare Function slAttach Lib "SQLiteningVB.Dll" Alias "slAttachVB" (ByRef rsFileName As String, ByRef rsAsDatabaseName As String, Optional ByRef rsModChars As String) As Long
Declare Function slBuildBindDat Lib "SQLiteningVB.Dll" Alias "slBuildBindDatVB" (ByRef rsData As String, Optional ByRef rsModChars As String) As String
Declare Function slBuildInsertOrUpdate Lib "SQLiteningVB.Dll" Alias "slBuildInsertOrUpdateVB" (ByRef rsTable As String, ByRef rsValues As String, Optional ByRef rsColumns As String, Optional ByRef rsWhere As String) As String

Declare Sub slClose Lib "SQLitening.Dll" ()
Declare Sub slCloseSet Lib "SQLitening.Dll" (Optional ByVal rlSetNumber As Long)

Declare Function slConnect Lib "SQLiteningVB.Dll" Alias "slConnectVB" (Optional ByRef rsServer As String, Optional ByVal rlPort As Long, Optional ByRef rsModChars As String) As Long
Declare Function slConvertDat Lib "SQLiteningVB.Dll" Alias "slConvertDatVB" (rsData As String, Optional ByRef rsModChars As String) As String

Declare Sub slDisconnect Lib "SQLitening.Dll" ()
Declare Function slExe Lib "SQLiteningVB.Dll" Alias "slExeVB" (ByRef rsStatement As String, Optional ByRef rsModChars As String) As Long

Declare Function slExeBind Lib "SQLiteningVB.Dll" (ByRef rsStatement As String, ByRef rsData As String, Optional ByRef rsModChars As String) As Long
Declare Function slF Lib "SQLitening.Dll" (ByVal rlColumnNumber As Long, Optional ByVal rlSetNumber As Long) As String
Declare Function slFN Lib "SQLitening.Dll" (ByRef rsColumnName As String, Optional ByVal rlSetNumber As Long) As String

Declare Function slFNX Lib "SQLiteningVB.Dll" Alias "slFNXVB" (ByRef rsColumnName As String, Optional ByRef rsModChars As String, Optional ByVal rlSetNumber As Long) As String
Declare Function slFX Lib "SQLiteningVB.Dll" Alias "slFXVB" (ByVal rlColumnNumber As Long, Optional ByRef rsModChars As String, Optional ByVal rlSetNumber As Long) As String
Declare Function slGetChangeCount Lib "SQLiteningVB.Dll" Alias "slGetChangeCountVB" (Optional ByRef rsModChars As String) As Long

Declare Function slGetColumnCount Lib "SQLitening.Dll" (Optional ByVal rlSetNumber As Long) As Long
Declare Function slGetColumnName Lib "SQLitening.Dll" (Optional ByVal rlColumnNumber As Long, Optional ByVal rlSetNumber As Long) As String
Declare Function slGetColumnNumber Lib "SQLitening.Dll" (ByRef rsColumnName As String, Optional ByVal rlSetNumber As Long) As Long
Declare Function slGetError Lib "SQLitening.Dll" () As String
Declare Function slGetErrorNumber Lib "SQLitening.Dll" () As Long

Declare Function slGetFile Lib "SQLiteningVB.Dll" Alias "slGetFileVB" (ByRef rsFileName As String, ByRef wsFileData As String, Optional ByRef rsModChars As String) As Long
Declare Function slGetHandle Lib "SQLiteningVB.Dll" Alias "slGetHandleVB" (Optional ByRef rsModChars As String, Optional ByVal rlSetNumber As Long) As Long
Declare Function slGetInsertID Lib "SQLiteningVB.Dll" Alias "slGetInsertIDVB" () As Currency
Declare Function slGetRow Lib "SQLiteningVB.Dll" Alias "slGetRowVB" (Optional ByVal rlSetNumber As Long, Optional ByRef rsModChars As String) As Long

Declare Function slGetTableColumnNames Lib "SQLitening.Dll" (ByRef rsTable As String) As String

Declare Function slGetTableNames Lib "SQLiteningVB.Dll" Alias "slGetTableNamesVB" (Optional ByRef rsDataBase As String) As String

Declare Function slGetUnusedSetNumber Lib "SQLitening.Dll" () As Long
Declare Function slIsColumnNameValid Lib "SQLitening.Dll" (ByRef rsColumnName As String, Optional ByVal rlSetNumber As Long) As Long
Declare Function slIsColumnNumberValid Lib "SQLitening.Dll" (ByVal rlColumnNumber As Long, Optional ByVal rlSetNumber As Long) As Long
Declare Function slIsFieldNull Lib "SQLitening.Dll" (ByVal rlColumnNumber As Long, Optional ByVal rlSetNumber As Long) As Long
Declare Function slIsSetNumberValid Lib "SQLitening.Dll" (Optional ByVal rlSetNumber As Long) As Long

Declare Function slOpen Lib "SQLiteningVB.Dll" Alias "slOpenVB" (Optional ByRef rsFileName As String, Optional ByRef rsModChars As String) As Long

Declare Sub slPopDatabase Lib "SQLitening.Dll" (Optional rsSave As String)
Declare Sub slPushDatabase Lib "SQLitening.Dll" (Optional wsSave As String)

Declare Function slPutFile Lib "SQLiteningVB.Dll" Alias "slPutFileVB" (ByRef rsFileName As String, ByRef rsFileData As String, Optional ByRef rsModChars As String) As Long
Declare Function slSel Lib "SQLiteningVB.Dll" Alias "slSelVB" (ByRef rsStatement As String, Optional ByVal rlSetNumber As Long, Optional ByRef rsModChars As String) As Long

Declare Sub slSetProcessMods Lib "SQLitening.Dll" (ByRef rsModChars As String)

Title: Re: VB6 Compatbility
Post by: D. Wilson on November 07, 2008, 09:55:14 PM
A big THANK YOU goes to Fred. The SQLiteningVB DLL provides a nice bridge for us users trying to make the transition. I really appreciate Fred's willingness to work on this aspect of the the SQLitening project. I am working on testing the SQLiteningVB DLL with VB6 and will report any issues I encounter.