Page 1 of 1

File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Sun Jul 25, 2021 2:08 pm
by max
When i use

Code: Select all | Expand

oCn:=FW_OpenAdoConnection("name.db")

works fine,
but i have to access data to a db sql lite 3 named "name.sqlite3", and

Code: Select all | Expand

oCn:=FW_OpenAdoConnection("name.sqlite3")

doesn't work!
And i can't rename the file, because it is in use by another third-party application.
How can I solve it in the best way?
Thank you.

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Sun Jul 25, 2021 2:56 pm
by Antonio Linares
Have you tried "name.sqlite3.db" ?

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Sun Jul 25, 2021 10:19 pm
by rhlawek
Antonio,

Changing to a .db extension would work, except he has already stated he can't change the name.

But the reason .sqlite3 doesn't work is this extension is not one of the explicitly allowed list of extensions in FW_AdoConnectionString():

Code: Select all | Expand


   if '.' $ c
      cExt     := Lower( cFileExt( c ) )
      if cExt == "db"
         cRDBMS      := "SQLITE"; aSpec[ 3 ] := c; c := ''
      elseif cExt $ "mdb,accdb"
         cRDBMS      := "MSACCESS"
      elseif cExt == "db"
         cRDBMS      := "SQLITE"
      else
         return ""
      endif
 

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Mon Jul 26, 2021 6:53 am
by max
Antonio,
i confirm: even with 'name.sqlite3.db' it doesn't work, and I can't change the file name unfortunately.

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Mon Jul 26, 2021 9:41 am
by nageswaragunupudi
Please try

Code: Select all | Expand

FW_OpenAdoConnection( { "SQLITE", "name.sqlite3" } )


OR

Code: Select all | Expand

FW_OpenAdoConnection( "SQLITE,name.sqlite3")

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Mon Jul 26, 2021 10:16 am
by max
Mr. Rao,
unfortunately both don't work.

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Tue Jul 27, 2021 2:18 pm
by nageswaragunupudi

Code: Select all | Expand

  cStr  := "Provider=MSDASQL;Driver=SQLite3 ODBC Driver;Server=;Database=name.sqlite3;User=admin;Password=;"
   oCn   := FW_OpenAdoConnection( cStr )

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Posted: Tue Jul 27, 2021 2:48 pm
by max
Mr. Rao,
ok!
Thank you.

Max