File name .sqlite3 not work with FW_OpenAdoConnection

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

File name .sqlite3 not work with FW_OpenAdoConnection

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 42516
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
User avatar
rhlawek
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Post 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
 
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

Post by max »

Antonio,
i confirm: even with 'name.sqlite3.db' it doesn't work, and I can't change the file name unfortunately.
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Post by nageswaragunupudi »

Please try

Code: Select all | Expand

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


OR

Code: Select all | Expand

FW_OpenAdoConnection( "SQLITE,name.sqlite3")
Regards

G. N. Rao.
Hyderabad, India
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

Post by max »

Mr. Rao,
unfortunately both don't work.
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Post by nageswaragunupudi »

Code: Select all | Expand

  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
max
Posts: 128
Joined: Fri Jun 30, 2006 2:14 pm
Location: Ancona - Italy

Re: File name .sqlite3 not work with FW_OpenAdoConnection

Post by max »

Mr. Rao,
ok!
Thank you.

Max
Post Reply