File name .sqlite3 not work with FW_OpenAdoConnection

File name .sqlite3 not work with FW_OpenAdoConnection

Postby max » Sun Jul 25, 2021 2:08 pm

When i use
Code: Select all  Expand view
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 view
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.
User avatar
max
 
Posts: 128
Joined: Fri Jun 30, 2006 2:14 pm
Location: Ancona - Italy

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Postby Antonio Linares » Sun Jul 25, 2021 2:56 pm

Have you tried "name.sqlite3.db" ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Postby rhlawek » Sun Jul 25, 2021 10:19 pm

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 view

   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
 
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Postby max » Mon Jul 26, 2021 6:53 am

Antonio,
i confirm: even with 'name.sqlite3.db' it doesn't work, and I can't change the file name unfortunately.
User avatar
max
 
Posts: 128
Joined: Fri Jun 30, 2006 2:14 pm
Location: Ancona - Italy

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Postby nageswaragunupudi » Mon Jul 26, 2021 9:41 am

Please try
Code: Select all  Expand view
FW_OpenAdoConnection( { "SQLITE", "name.sqlite3" } )


OR

Code: Select all  Expand view
FW_OpenAdoConnection( "SQLITE,name.sqlite3")
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Postby max » Mon Jul 26, 2021 10:16 am

Mr. Rao,
unfortunately both don't work.
User avatar
max
 
Posts: 128
Joined: Fri Jun 30, 2006 2:14 pm
Location: Ancona - Italy

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Postby nageswaragunupudi » Tue Jul 27, 2021 2:18 pm

Code: Select all  Expand view
  cStr  := "Provider=MSDASQL;Driver=SQLite3 ODBC Driver;Server=;Database=name.sqlite3;User=admin;Password=;"
   oCn   := FW_OpenAdoConnection( cStr )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Postby max » Tue Jul 27, 2021 2:48 pm

Mr. Rao,
ok!
Thank you.

Max
User avatar
max
 
Posts: 128
Joined: Fri Jun 30, 2006 2:14 pm
Location: Ancona - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests