• Welcome, Guest. Please login.
 
August 20, 2019, 04:48:31 am

News:

Welcome to the SQLitening support forums!


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Fredrick Ughimi

81
Hello,


slSel "SELECT * from tblPersonnel, tblPayroll WHERE tblPersonnel.PIN = tblPayroll.PIN;"


I get error -13 - Invalid column name or number.

I think I have hit the same problem Joe Byrne had here:
http://www.sqlitening.com/support/index.php?topic=2601.msg13025#msg13025

The solution wasn't shown on the thread.

TblPersonnel was created like this:


slExe Build$("Create Table If Not Exists tblPersonnel(PIN Integer Primary Key, Surname, Othernames, Sex,", _
      "BirthDate, Age, FirstAppDate, ConfirmDate, RetireDate, Rank, CONTISS, HighQual, DeptSch, [Union], GLS, [Address],", _
      "LGA, [State], MStatus, [Shift], KinName, KinPhoneNo, KinEmail, KinAddress, KinRelate, PixPath, Remark)")   


TblPayroll was created like this:


slExe Build$("Create Table If Not Exists tblPayroll(PIN INTEGER Unique, Bank, Salary, Arrears, Rent, [Shift],", _
         "ActAllow, GrossPay, Tax, ASUCHT, NASU, SalaryAdv, BankLoan, [PGLoan], CorpLoan, [CorpCont],", _
         "Welfare, [Refunds], OtherDedu, [NetPay])")

   
Any suggestion greatly be appreciated.
82
Hello,

I am re-writing my payroll program using SQLitening. To say the least I have been quite impressed with SQLitening. I have been able to do the things I used to do with Cheetah more efficiently and much more.

I am having problems breaking this line of SQLitening code:


slExe "Create Table If Not Exists tblPersonnel(PIN Integer Primary Key, Surname, Othernames, Sex, BirthDate, Age, FirstAppDate, ConfirmDate, RetireDate, Rank, CONTISS, HighQual, DeptSch, [Union], GLS, [Address], LGA, [State], MStatus, Shift, KinName, KinPhoneNo, KinEmail, KinAddress, KinRelate, PixPath, Remark )"


I get Source line too long - Error 407. Is there a special way to do it  'cos I tried the line continuation character without success.

Best regards,
83
Hello,

Been playing around SQLitening.

I want to update (Modify) a record based on the value of a textbox. In this case sUsername.

What is the correct syntax for updating a records using slBuildInsertOrUpdate and Update. I used the following:


slExe slBuildInsertOrUpdate("tblCreateUsers", sUsername & $Nul & sPassword & $Nul & sStatus, "Username = '" + sUsername + " ' ")


I got syntax error.in "="


slExe "Update tblCreateUsers Set Username = sUsername, Password = sPassword, Status = sStatus Where Username='" + sUsername + "'"


I got column not found in table error.

I guess I am missing something?  ???
84
Hello All,

I wonder if SQLitening can handle parameterised Query. Something like this:


local sFrom as string
local sTo as string

CONTROL GET TEXT hDlg, FromDateid& TO sFrom
CONTROL GET TEXT hDlg, ToDateid& TO sTo

SELECT * FROM tblStoreReceives WHERE [InvoiceDate] BETWEEN sFrom AND sTo


Since SQLite don't support data navigation, would it be impractical to implement it in SQLitening? Just wondering. 'Cos Clients like to navigating their data.

Thanks guys for the great work with SQLitening.

Kind regards,

85
Hello,

Been waiting to get to this point for a while now - An opportunity to start using SQLite Client/Server. Just landed a contract to develop an inventory program for a small pharmacy outfit. I would be asking some basic questions as I move along. Hope you would be patient with me.  ;D

First of, I am having problems with Adding table/index in my database. I get error 1. Here is my code snippet: Mostly Paul's sample codes.



sDatabase = "PharmacyProDB.db3"
   
       StartAgain:
     
       sql3_StartSession hSession, 0   ' do not use Unicode support

       sSQL = "SERVER = localhost; PORT = default; UID = pss234; PASSWORD = sqlrocks"
       errcode = sql3_connect( hSession, sSQL )
       If errcode Then
          MsgBox "Error:" & Str$(errcode) & " during sql3_connect.":  GoTo ExitOut
       End If
       
       errcode = sql3_Use( hSession, sDatabase, %SQL3_REMOTE)
       If errcode Then
          MsgBox "Error:" & Str$(errcode) & " during sql3_use.":  GoTo ExitOut
       End If
   
       sSQL = "CREATE TABLE [tblLogin] ( "   & _
               "[Username] Text Primary Key, "  & _
               "[Password] Text, "          & _
               "[Status] Text; "     & _
       "Create INDEX [Usernamendx] On [tblLogin] ([Username]);"               
       errcode = sql3_exec( hSession, sSQL )
       If errcode Then
          MsgBox "Error:" & Str$(errcode) & " during sql3_exe (Adding table/index).":  GoTo ExitOut
       End If

      ExitOut:

       If hSession Then
          If rs Then sql3_rsDestroy hSession, rs
          sql3_Disconnect hSession
          sql3_EndSession hSession
       End If
   


From the sql3routine file it says error 1 is means - "SQL error or missing database". Hmm... I also get the same error when I run the sample_create.bas file.

Best regards,
86
Hello Paul,

I have been trying out SQLite Client / Server for about two days.

I can connect to the server, add records, etc. The problem is that each time
I want to view the entered records using Sqlite Expert Personal or any other tool I get "the database file is
locked". I would  have to stop the server manually before I can view the records.
I thought sql3_disconnect gSession would do that.

Am I missing something?  ???

Best regards,