• Welcome, Guest. Please login.
 
October 14, 2019, 04:35:37 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

21
Hello,

I am trying to delete duplicate records in tblBioData from HospitalProDB.


#COMPILE EXE
#DIM ALL
#INCLUDE "SQLitening.Inc"

FUNCTION PBMAIN () AS LONG

    slOpen ("HospitalProDB.db3")

    slExe "Begin"
        slEXE "delete from tblBioData where rowid not in(select  min(rowid) from tblBioData group by HospitalNo, PhoneNo)
    slExe "End"
   
   ? "Duplicates Deleted!"

END FUNCTION         


Then try to copy RowID to HospitalNo Column:


#COMPILE EXE
#DIM ALL

#INCLUDE "SQLitening.INC"

FUNCTION PBMAIN () AS LONG

    slOpen ("HospitalProDB.db3")

    slExe "Begin"
        slEXE "update tblBioData set HospitalNo = RowID"
    slExe "End"

    MSGBOX "Column Copied Successfully!", %MB_TASKMODAL OR %MB_ICONINFORMATION, "Mega-Net HospitalPro"

END FUNCTION
                   


I still get error 19 - HospitalNo and PhoneNo not unigue.

Any suggestion would be appreciated
22
You've got Questions? We've got Answers! / Timestamp
September 06, 2017, 10:04:48 pm
Hello,

How can one insert a timestamp ("datetime('now','localtime')") into a table using slBuildInsertOrUpdate and Insert statements?

This works pretty well:


slExe  "insert into Table (TimeSent) values(datetime('now','localtime'));


But I have issues with using multiple fields:


slExe  "insert into Table (TimeSent, Sender, Receiver, Message) values(datetime('now','localtime'), sSender, sReceiver, sMessage);

24
Hello,

On a Client/Server arrangement I guess its ok to load images from a
sub directory of the client computer i. e C:\ClientFiles\Pictures
and saved on the remote SQlitening Database.

I get a error "-8 Access Denied" and sometimes I get "-9 - File does not exit"


m_sPixNamePath = Exe.Path$ & "Pictures\" & m_sPixName
slGetFile m_sPixNamePath, m_sPicture, "E1" '9216 bytes


Is there a way around this?
25
Hello,

How can one protect an SQLite/SQLitening database? Is it possible to prevent it from being opened by third party applications.

Best regards,
26
Hello All,

This works (displays) great.


slSel "SELECT * FROM tblDPRRegistration WHERE RegistrationNo = '" + sRegistrationNo + "'" 
hpix = dpAddGraphic(ihandle%, VD_App.Path & "Ughimi.jpg")
If hpix Then
  dpDrawGraphic ihandle%, hpix,6.4,6.1,7.8,11
End If


Now I want to embed the image through an SQLitening image field, which is not displaying:

slSel "SELECT * FROM tblDPRRegistration WHERE RegistrationNo = '" + sRegistrationNo + "'" 
hpix = dpAddGraphic(ihandle%, slFN("Picture"))
If hpix Then
  dpDrawGraphic ihandle%, hpix,6.4,6.1,7.8,11
End If


Or at least through a variable which contains the name of image, which is giving me an error (parameter mismatch):

slSel "SELECT * FROM tblDPRRegistration WHERE RegistrationNo = '" + sRegistrationNo + "'" 
hpix = dpAddGraphic(ihandle%, m_sPicture)
If hpix Then
  dpDrawGraphic ihandle%, hpix,6.4,6.1,7.8,11
End If


Glad if I could be pointed in the right direction.

Best regards,
27
Hello,

I guess I would need to install the server files and client files when installing SQLitening on the Cloud. Wondering if Client Files alone would suffice.

Best regards,
28
Hello,

This is the first I am installing Sqlitening on Windows Server 2003. Success so far and my application runs in remote mode on the Windows 2003 Server. But I am having error -16 when running this application from a client computer (running windows 7).

Is there anything I need to do differently on the server computer?

Best regards,
29
Hello,

Is it possible to do a multiple Delete, Insertion and Update on the commented lines of the selected rows in a Listview?


Do
     Incr iPos
     ListView Get Select hfrmRegistration2&, %ID_FRMREGISTRATION2_LISTVIEW1, iPos To iPos
     
    slExe slBuildInsertOrUpdate("tblRoomRates", sRoomNo & $Nul & "Available", "RoomNo, Status", "RoomNo=" & sRoomNo) ' [b]Multiple Update Here[/b]
   
    Errorcode& = slExe("Insert into tblRegistrationHistory Select * From tblRegistration Where RowID = '" + sRecordNo + "'","E") ' [b]Multiple Insertion Here [/b] -
   
   
    ListView Delete ITEM hfrmRegistration2&, %ID_FRMREGISTRATION2_LISTVIEW1, iPos
    Control Redraw hfrmRegistration2&, %ID_FRMREGISTRATION2_LISTVIEW1
   
    slEXE "Delete From tblRegistration WHERE RowID = '" + sRecordNo + "'" [b]'Multiple Delete Here[/b]

Loop While iPos
 
30
Hello,

Adapting Mike report solution at http://www.powerbasic.com/support/pbforums/showthread.php?p=480712#post480712 I have discovered that some existing records would display and others won't display. Don't know why that is. For instance this won't display even though the record exists.

Something not right I guess.


#COMPILE EXE
#DIM ALL
#INCLUDE "win32api.inc
#INCLUDE "sqlitening.inc"
#INCLUDE "ddoc_p32.inc"
'DDOC
'  Needed Color Constants (Vb compatible)
'---------------------------------------------------------------------------
%vbBlack = &H0&
%vbRed = &HFF&
%vbGreen = &HFF00&
%vbYellow = &HFFFF&
%vbBlue = &HFF0000
%vbMagenta = &HFF00FF
%vbCyan = &HFFFF00
%vbWhite = &HFFFFFF
%vbGrey = &HC0C0C0
%LIGHT_SHADE = &HE0E0E0
%vbOrange = &HFF3118
FUNCTION PBMAIN () AS LONG
  slOpen ("GuestsProDB.db3","C")

  'Registration
   slExe BUILD$("Create Table If Not Exists tblRegistration(LoyaltyID TEXT COLLATE NOCASE, DateTaken TEXT, Title TEXT, Surname TEXT COLLATE NOCASE, Othernames TEXT COLLATE NOCASE, Sex TEXT,", _
  "MStatus TEXT, Nationality TEXT, CompanyAddress TEXT, PhoneNo TEXT, NoOfNights TEXT, NoOfAdults TEXT, DepartTo TEXT, MeansOfTravel TEXT,", _
  "NatureOfVisit TEXT, Account TEXT, RoomRate REAL, BillNo TEXT, ArrivalDate TEXT, DepartureDate TEXT, NoOfChildren TEXT, Occupation TEXT,", _
  "HomeAddress TEXT, ArriveFrom TEXT, VehicleNo TEXT, VehicleType TEXT, VehicleColour TEXT, PassportNo TEXT, AllienCertificateNo TEXT,", _
  "AccountSettledBy TEXT, RoomType TEXT, RoomNo TEXT COLLATE NOCASE, NoOfGuests TEXT, Time TEXT, Remarks TEXT, CheckedOut, StayOver,", _
  "ReceiptNo TEXT, Deposit REAL, VAT REAL, ServiceCharge REAL, Discount REAL, PaymentMode TEXT, ChequeNo TEXT, Cashier TEXT, LoyaltyGuestStatus TEXT)")

   slExe "Create UNIQUE Index If Not Exists Registrationndx1 ON tblRegistration(BillNo, LoyaltyID)"

   slExe "Create Index If Not Exists Registrationndx3 ON tblRegistration(Surname, Othernames)"

   'Sales
   slExe BUILD$("Create Table If Not Exists tblSales(Name Text, BillNo, DocketNo Text, RoomNo Text, Date Text, ProductNo Text Collate NOCASE, Description Text,", _
     "Category Text, Department Text, Quantity Integer, SellingPrice REAL, Discount, VAT REAL, ServiceCharge REAL, Remarks Text, Username Text)")

   slExe "Create Index If Not Exists Salesndx1 ON tblSales(DocketNo, ProductNo, Department)"

   'LaundryReceives
   slExe BUILD$("Create Table If Not Exists tblLaundryReceives(Date TEXT, BillNo TEXT, DocketNo TEXT, Name TEXT, Service TEXT, Quantity INTEGER, Price REAL, Discount REAL)")

   slExe "Create Index If Not Exists LaundryReceivesndx1 On tblLaundryReceives(Name, BillNo, DocketNo)"

  'ReportGuestsAccountStatus()
END FUNCTION
FUNCTION NigeriaDate(sDate AS STRING) AS STRING
     'From yyyy-MM-dd To dd-MM-yyyy
      FUNCTION = MID$(sDate,9,2) & "-" & MID$(sDate,6,2) & "-" & MID$(sDate,1,4)
END FUNCTION
FUNCTION SQLiteDate(sDate AS STRING) AS STRING
     'From dd-MM-yyyy To yyyy-MM-dd
      FUNCTION = MID$(sDate,7,4) & "-" & MID$(sDate,4,2) & "-" & MID$(sDate,1,2)
END FUNCTION
FUNCTION PBDate(sDate AS STRING) AS STRING
     '02-05-2010
   FUNCTION = MID$(sDate,4,2) & "-" & MID$(sDate,1,2) & "-" & MID$(sDate,7,4)
END FUNCTION

FUNCTION ReportGuestsAccountStatus() AS LONG
      LOCAL dbHandle&, LineSpacing!,iHandle%,Row!,TopMargin!,PageSize!,PageNumber&
      LOCAL detailline AS ASCIIZ * 200
      LOCAL detailline2 AS ASCIIZ * 200
      LOCAL SNo AS LONG
      LOCAL lTotalRecords&
      LOCAL sFrom AS STRING
      LOCAL sTo AS STRING
      LOCAL dTotalVATAmount AS DOUBLE
      LOCAL dGrossTotal AS DOUBLE
      LOCAL dVAT AS DOUBLE
      LOCAL dGross AS DOUBLE
      LOCAL dTotalServiceAmount AS DOUBLE
      LOCAL dTotalBill AS DOUBLE
      LOCAL dTotalDeposit AS DOUBLE
      LOCAL sBillNo AS STRING
      LOCAL dBalance AS DOUBLE
      LOCAL dTotalAmount AS DOUBLE
      LOCAL dTotalDiscount AS DOUBLE
      LOCAL dAccommodation AS DOUBLE
      LOCAL sSurname AS STRING
      LOCAL sOthernames AS STRING
      LOCAL dNETTOTAL AS DOUBLE
      LOCAL dSERVICECHARGE AS DOUBLE
      LOCAL dTotalDockets AS DOUBLE
      LOCAL dAccommodationLessDiscount AS DOUBLE
      LOCAL dDiscount AS DOUBLE
      LOCAL dTotalAdditionalPayments AS DOUBLE
      LOCAL dTotalPayments AS DOUBLE
      LOCAL Discount AS DOUBLE
      LOCAL dSalesAmount AS DOUBLE
      LOCAL dLaundryReceivesAmount AS DOUBLE
      LOCAL lTotalRooms&
      LOCAL Str AS STRING
      LOCAL sLoyaltyID AS STRING
      LOCAL sRoomNo AS STRING
      LOCAL dTotalSalesDockets AS DOUBLE
      LOCAL dTotalLaundryReceivesDockets AS DOUBLE


      LOCAL hjpg AS LONG
       LineSpacing = .2
      TopMargin   = .5
      PAGESIZE    = 7
       'note: If ddoc.exe does not exist endless loop here
      ihandle% = dpStartDoc(0,"Mega-Net GuestsPro - Guests Account Status Report","",%DDOC_INCH, %DDOC_PAPER_A4, %DDOC_PORTRAIT, %DDOC_SYSTEM_DEFAULT, %DDOC_BIN_AUTO OR %DDOC_ALLOWSMTP OR %DDOC_ALLOWSAVE OR %DDOC_ZOOMFIT)
       IF ihandle < 1 THEN
           MSGBOX "Could not StartDoc. Error number" + STR$(Ihandle)
           GOTO EndProgram
      END IF
       dpSetTabs iHandle, "L.5W1 L1W1 L2W1 L3.2W2 L4.1W3 L7W1"
       ROW = PAGESIZE    '7 above                        'force new heading

      sFrom = "28-01-2015"
      sTo = "01-08-2015"
      sBillNo = "BN20828120152"

          'ReportsInformation.Reports
          slSEL "SELECT COUNT(*) As RowCount FROM tblSales WHERE Date BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
         IF ISTRUE slGetRow() THEN
            lTotalRecords& = VAL(slFN("RowCount"))
         END IF
         slCloseSet

         slSEL "SELECT COUNT(*) As RowCount FROM tblRegistrationHistory WHERE DateTaken BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
         IF ISTRUE slGetRow() THEN
            lTotalRooms& = VAL(slFN("RowCount"))
         END IF
         slCloseSet

          slSel "SELECT SUM(SellingPrice * Quantity) As TotalSalesDockets, * From tblSales WHERE Date BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
          IF ISTRUE slGetRow() THEN
            dTotalSalesDockets = VAL(slFN("TotalSalesDockets"))
          END IF
          slCloseSet()

          slSel "SELECT SUM(Price * Quantity) As TotalLaundryReceivesDockets, * From tblLaundryReceives WHERE Date BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
          IF ISTRUE slGetRow() THEN
            dTotalLaundryReceivesDockets = VAL(slFN("TotalLaundryReceivesDockets"))
          END IF
          slCloseSet()

          dTotalDockets = dTotalSalesDockets + dTotalLaundryReceivesDockets
          slSel "SELECT SUM(Amount) As TotalAdditionalPayments, * From tblAdditionalPayments WHERE Date BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
          IF ISTRUE slGetRow() THEN
            dTotalAdditionalPayments = VAL(slFN("TotalAdditionalPayments"))
          END IF
          slCloseSet()

           slSEL "SELECT SUM(Deposit) as TotalDeposit, * FROM tblRegistrationHistory WHERE DateTaken BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
          IF ISTRUE slGetRow() THEN
             dTotalDeposit = VAL(slFN("TotalDeposit"))
          END IF
          slCloseSet()

          slSEL "SELECT SUM(Discount) as TotalDiscount, * FROM tblRegistrationHistory WHERE DateTaken BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
          IF ISTRUE slGetRow() THEN
             dTotalDiscount = VAL(slFN("TotalDiscount"))
          END IF
          slCloseSet()

          slSEL "SELECT SUM(NoOfNights * RoomRate) as Accommodation, * FROM tblRegistrationHistory WHERE DateTaken BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND BillNo = '" + sBillNo + "' "
          IF ISTRUE slGetRow() THEN
             dAccommodation = VAL(slFN("Accommodation"))
             dVAT = VAL(slFN("VAT"))
             dServiceCharge = VAL(slFN("ServiceCharge"))
          END IF
          slCloseSet

           dAccommodationLessDiscount =  dAccommodation -  dTotalDiscount
           dNETTOTAL = dAccommodationLessDiscount + dVAT + dSERVICECHARGE

            slSel "SELECT tblRegistrationHistory.DateTaken as RegistrationDateTaken," & _
            " tblRegistrationHistory.BillNo as RegistrationHistoryBillNo," & _
            " tblRegistrationHistory.Surname as RegistrationHistorySurname," & _
            " tblRegistrationHistory.Othernames as RegistrationHistoryOthernames," & _
            " tblRegistrationHistory.LoyaltyID as RegistrationHistoryLoyaltyID," & _
            " tblRegistrationHistory.RoomNo as RegistrationHistoryRoomNo," & _
            " tblSales.Date as SalesDate," & _
            " tblSales.BillNo as SalesBillNo," & _
            " tblSales.DocketNo as SalesDocketNo," & _
            " tblSales.RoomNo as SalesRoomNo," & _
            " tblSales.Description as SalesDescription," & _
            " tblSales.SellingPrice as SalesSellingPrice," & _
            " tblSales.Quantity as SalesQuantity," & _
            " tblSales.Name as SalesName" & _
            " FROM" & _
            " tblRegistrationHistory" & _
            " INNER JOIN tblSales ON (RegistrationHistoryBillNo=SalesBillNo)" & _
            " WHERE tblRegistrationHistory.DateTaken BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND tblRegistrationHistory.BillNo = '" + sBillNo + "'"
             DO WHILE slGetRow()
              GOSUB CheckPageSize
               dSalesAmount = VAL(slFN("SalesSellingPrice")) * VAL(slFN("SalesQuantity"))
              INCR SNo
               DetailLine$ =  _
                STR$(SNo) + $TAB + _
                NigeriaDate(slFN("SalesDate")) + $TAB + _
                slFN("SalesDocketNo") + $TAB + _
                slFN("SalesRoomNo") + $TAB + _
                slFN("SalesDescription") + $TAB + _
                FORMAT$(dSalesAmount)
                dpTabText iHandle%, ROW + 3.2, DetailLine
                ROW = ROW + LineSpacing                    'increment line counter
           LOOP

         '? "LaundryReceives starts with" + str$(sNo)
          slSel "SELECT tblRegistrationHistory.DateTaken as RegistrationDateTaken," & _
            " tblRegistrationHistory.BillNo as RegistrationHistoryBillNo," & _
            " tblRegistrationHistory.Surname as RegistrationHistorySurname," & _
            " tblRegistrationHistory.Othernames as RegistrationHistoryOthernames," & _
            " tblRegistrationHistory.LoyaltyID as RegistrationHistoryLoyaltyID," & _
            " tblRegistrationHistory.RoomNo as RegistrationHistoryRoomNo," & _
            " tblLaundryReceives.Date as LaundryReceivesDate," & _
            " tblLaundryReceives.BillNo as LaundryReceivesBillNo," & _
            " tblLaundryReceives.DocketNo as LaundryReceivesDocketNo," & _
            " tblLaundryReceives.Service as LaundryReceivesService," & _
            " tblLaundryReceives.Price as LaundryReceivesPrice," & _
            " tblLaundryReceives.Quantity as LaundryReceivesQuantity" & _
            " FROM" & _
            " tblRegistrationHistory" & _
            " INNER JOIN tblLaundryReceives On (RegistrationHistoryBillNo=LaundryReceivesBillNo)" & _
            " WHERE tblRegistrationHistory.DateTaken BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND tblRegistrationHistory.BillNo = '" + sBillNo + "'"

          DO WHILE slGetRow()
             GOSUB CheckPageSize
             'LaundryReceives
            dLaundryReceivesAmount = VAL(slFN("LaundryReceivesSellingPrice")) * VAL(slFN("LaundryReceivesQuantity"))
            INCR SNo
             DetailLine$ =  _
              STR$(SNo) + $TAB + _
              NigeriaDate(slFN("LaundryReceivesDate")) + $TAB + _
              slFN("LaundryReceivesDocketNo") + $TAB + _
              slFN("LaundryReceivesDescription") + $TAB + _
              FORMAT$(dLaundryReceivesAmount)
              dpTabText iHandle%, ROW + 3.2, DetailLine
              ROW = ROW + LineSpacing                     'increment line counter
          LOOP


          dpEndDoc iHandle%, %DDOC_END_VIEW + %DDOC_END_PRINT
        EndProgram:
EXIT FUNCTION
CheckPageSize:
  IF ROW => PAGESIZE THEN
                IF PageNumber THEN      'If first page don't need a new page
                  dpNewPage iHandle%,  %ddoc_PAPER_A4, %DDOC_PORTRAIT, %DDOC_BIN_AUTO
               END IF
               INCR PageNumber
                  hjpg = dpAddGraphic(ihandle%, EXE.PATH$ & "Logo.jpg")
                 IF hjpg THEN
                    dpDrawGraphic ihandle%, hjpg,3.8,.2,2,1
                 END IF
                dpText iHandle%, .5,TopMargin,  %DDOC_Left,"Page: "+ STR$(PageNumber)+""
               dpText iHandle%, 6,TopMargin,  %DDOC_Left,"Date: "+ PBDate(DATE$)+""
               dpText iHandle%, 6,TopMargin +.2,  %DDOC_Left,"Time: "+ TIME$+""
               ROW =TopMargin + LineSpacing * 4
               dpFont ihandle%, %DDOC_FONTNORMAL + %DDOC_FONTBOLD, 13, %vbGreen, "Arial"
               dpText ihandle, 4.25, 1.1, %DDOC_CENTER, "" & "gName"
               dpFont ihandle%, %DDOC_FONTNORMAL + %DDOC_FONTBOLD, 12, %vbBlack, "Arial"
               dpText IHandle%, 4.25, 1.4, %DDOC_CENTER, "" & "gAddress"
               dpFont ihandle%, %DDOC_FONTNORMAL + %DDOC_FONTUNDERLINE + %DDOC_FONTBOLD, 12, %vbBlack, "Arial"
               dpRect IHandle%, .4, 1.7, 8.0, 2.6, 3, %LIGHT_SHADE, 0
               dpText IHandle%, 4.25, 1.7, %DDOC_CENTER, "Guests Account Status Report"
               dpFont ihandle%, %DDOC_FONTNORMAL, 12, %vbBlack, "Arial"
               dpText IHandle%, 0.5, 2.0, %DDOC_LEFT, "Date: " &  sFrom  & " To  " & sTo
               dpText IHandle%, 3.7, 2.0, %DDOC_LEFT, "No Of Rooms: " + FORMAT$(lTotalRooms)
               dpText IHandle%, 6.2, 2.0, %DDOC_LEFT, "LoyaltyID: " & slFN("RegistrationHistoryLoyaltyID")
               dpText IHandle%, 6.2, 2.3, %DDOC_LEFT, "Room No: " & slFN("RegistrationHistoryRoomNo")
               dpText IHandle%, 0.5, 2.3, %DDOC_LEFT, "Check-In Bill No: " + slFN("RegistrationHistoryBillNo")
               dpText IHandle%, 3.7, 2.3, %DDOC_LEFT, "Name: " & slFN("RegistrationHistorySurname") & " " & slFN("RegistrationHistoryOthernames")
               dpText IHandle%, .5, 2.9, %DDOC_LEFT, "Deposit Paid: "
               dpText IHandle%, 3.0, 2.9, %DDOC_RIGHT,  FORMAT$(dTotalDeposit, "#,.00")
               dpText IHandle%, .5, 3.2, %DDOC_LEFT, "Additional Payments: "
               dpText IHandle%, 3.0, 3.2, %DDOC_RIGHT,  FORMAT$(dTotalAdditionalPayments, "#,.00")
               dTotalPayments = dTotalDeposit + dTotalAdditionalPayments
               dpText IHandle%, .5, 3.5, %DDOC_LEFT, "Total Payments: "
               dpText IHandle%, 3.0, 3.5, %DDOC_RIGHT,  FORMAT$(dTotalPayments, "#,.00")
               dpLine IHandle%, .5, 3.7, 3, 3.7, 0, %vbBlue
               dpText IHandle%, 4.0, 2.9, %DDOC_LEFT, "Accommodation: "
               dpText IHandle%, 7.0, 2.9, %DDOC_RIGHT,  FORMAT$(dAccommodation, "#,.00")
               dpText IHandle%, 4.0, 3.1, %DDOC_LEFT, "Discount: "
               dpText IHandle%, 7.0, 3.1, %DDOC_RIGHT,  FORMAT$(dTotalDiscount, "#,.00")
               dpText IHandle%, 4.0, 3.3, %DDOC_LEFT, "VAT: "
               dpText IHandle%, 7.0, 3.3, %DDOC_RIGHT,  FORMAT$(dVAT, "#,.00")
               dpText IHandle%, 4.0, 3.5, %DDOC_LEFT, "Service Charge: "
               dpText IHandle%, 7.0, 3.5, %DDOC_RIGHT,  FORMAT$(dServiceCharge, "#,.00")
               dpText IHandle%, 4.0, 3.7, %DDOC_LEFT, "Accommodation Net:"
               dpText IHandle%, 7.0, 3.7, %DDOC_RIGHT,  FORMAT$(dNETTOTAL, "#,.00")
               dpText IHandle%, 4.0, 3.9, %DDOC_LEFT, "Dockets(Total):"
               dpText IHandle%, 7.0, 3.9, %DDOC_RIGHT,  FORMAT$(dTotalDockets, "#,.00")
               dTotalAmount = dNETTOTAL +  dTotalDockets
               dBalance =  dTotalAmount - dTotalPayments
               dpText IHandle%, 4.0, 4.1, %DDOC_LEFT, "Total Amount Payable:"
               dpText IHandle%, 7.0, 4.1, %DDOC_RIGHT,  FORMAT$(dTotalAmount, "#,.00")
               dpText IHandle%, 4.0, 4.3, %DDOC_LEFT, "Balance:"
               dpText IHandle%, 7.0, 4.3, %DDOC_RIGHT,  FORMAT$(dBalance, "#,.00")
               dpLine IHandle%, 4.0, 4.5, 7, 4.5, 0, %vbBlue
               dpText IHandle%, .5, 10.7, %DDOC_LEFT, "___________________________"
               dpText IHandle%, 1.1, 10.9, %DDOC_LEFT, "Guest's Sign: "
               dpText IHandle%, 5, 10.7, %DDOC_LEFT, "___________________________"
               dpText IHandle%, 5.6, 10.9, %DDOC_LEFT, "Manager's Sign: "
               dpFont ihandle%, %DDOC_FONTNORMAL + %DDOC_FONTUNDERLINE + %DDOC_FONTBOLD, 9, %vbBlack, "Arial"
               dpTabText iHandle%, ROW + 3.4, "S/No" + $TAB + "Date" + $TAB + "DocketNo" + $TAB + "RoomNo" _
               + $TAB + "Description" + $TAB + "Amount"
               dpFont ihandle%, %DDOC_FONTNORMAL, 8, %vbBlack, "San Serif"
               ROW =  ROW + LineSpacing * 2.1
             END IF
RETURN
END FUNCTION

31
Hello,

Has anyone here used SQLitening with Java?

Regards,

32
You've got Questions? We've got Answers! / Query
April 09, 2015, 10:33:52 pm
Hello,

Been scatching my head on this query. When I run it in my report I get no result. It comes out blank.


slSel "SELECT tblRegistration.DateTaken as RegistrationDateTaken," & _
            "   tblRegistration.BillNo as RegistrationBillNo," & _
            "   tblRegistration.Surname as RegistrationSurname," & _
            "   tblRegistration.Othernames as RegistrationOthernames," & _
            "   tblRegistration.LoyaltyID as RegistrationLoyaltyID," & _
            "   tblRegistration.RoomNo as RegistrationRoomNo," & _
            "   tblBarSales.Date as BarSalesDate," & _   
            "   tblBarSales.BillNo as BarSalesBillNo," & _ 
            "   tblBarSales.DocketNo as BarSalesDocketNo," & _
            "   tblBarSales.RoomNo as BarSalesRoomNo," & _
            "   tblBarSales.Description as BarSalesDescription," & _ 
            "   tblBarSales.SellingPrice as BarSalesSellingPrice," & _
            "   tblBarSales.Quantity as BarSalesQuantity," & _   
            "   tblMiniBarSales.Date as MiniBarSalesDate," & _
            "   tblMiniBarSales.BillNo as MiniBarSalesBillNo," & _
            "   tblMiniBarSales.DocketNo as MiniBarSalesDocketNo," & _
            "   tblMiniBarSales.RoomNo as MiniBarSalesRoomNo," & _
            "   tblMiniBarSales.Description as MiniBarSalesDescription," & _ 
            "   tblMiniBarSales.SellingPrice as MiniBarSalesSellingPrice," & _
            "   tblMiniBarSales.Quantity as MiniBarSalesQuantity" & _
            "   FROM" & _
            "   tblRegistration" & _
            "   INNER JOIN tblBarSales ON (RegistrationBillNo=BarSalesBillNo)" & _
            "   INNER JOIN tblMiniBarSales On (RegistrationBillNo=MiniBarSalesBillNo)" & _
            "   WHERE tblRegistration.DateTaken BETWEEN '" + SQLiteDate(sFrom) + "' AND '" + SQLiteDate(sTo) + "' AND tblRegistration.BillNo = '" + sBillNo + "'" & _
   


Maybe there is something I am doing wrong?

Thanks in advance for any pointers.
33
Hello,

Is it possible to retrieve the content of a field (by its position) without looping through the table?
34
Hello,

Is there an easy way to Join 5 Tables?  Is Compound Query the right candidate for it? if it is, its not very clear to me.

Best regards,
35
Hello,

I am looking for a FREE tool to convert Access files to SQLite.

Any ideas? Thanks.
36
Hello,

I wrote this a while ago but it isn't giving me what I want exactly. I want a LIKE query based on  first, second third, etc letters entered.

Can some one point me in the right direction.

Thank you.


Method SearcEaterySaleshListView(ByVal nCbHndl As Long) As Long
        Local iItem&
        Local sDescription As String
        Local sProductNo As String 
        Local sDate As String
       
        VD_ListView_Item_Delete(nCbHndl, %ID_FRMUPDATEEATERYSALES_LISTVIEW1, iItem)
           
        sDate = VD_GetText (nCbHndl, %ID_FRMUPDATEEATERYSALES_DPKDATE)
       
        Control Get Text nCbHndl, %ID_FRMUPDATEEATERYSALES_TXTSEARCH To sDescription
       
        slSEL "SELECT * from tblMainInventory WHERE Description LIKE '" + sDescription + "%'"
       
        'Do While slGetRow   
       
        If IsTrue slGetRow() Then
                       
            iItem = VD_ListView_Item_Add(nCbHndl, %ID_FRMUPDATEEATERYSALES_LISTVIEW1, slFN("ProductNo"), 0)
            VD_ListView_Item_Text(nCbHndl, %ID_FRMUPDATEEATERYSALES_LISTVIEW1, iItem, 1, slFN("Description"))
            VD_ListView_Item_Text(nCbHndl, %ID_FRMUPDATEEATERYSALES_LISTVIEW1, iItem, 2, slFN("CurrentQuantity"))
            VD_ListView_Item_Text(nCbHndl, %ID_FRMUPDATEEATERYSALES_LISTVIEW1, iItem, 3, slFN("SellingPrice"))
       
        End If
        slCloseSet
             
        'Loop 
       
   End Method

37
Hello All,

I can't seems to make this work:


Local sDescription As String
Control Get Text nCbHndl, %ID_FORM2_TXTSEARCH To sDescription
slSEL "SELECT * from tblEateryMainInventory WHERE Description LIKE '%sDescription'"


Any suggestion would be helpful.
38
Hello,

Just thinking. Is it possible to store multiple images in a field all at once?

Best regards,
39
Hello,

Trying to move data of certain fields from one Table to another table.

Not sure how possible this is.

40
Hello,

One of my clients sees this error. Any one seen this error before?

Quote
sqlite database disk image is malformed - Error 11
Quote