Paul,
Have you tried forcing a Commit on the SQLite data. That may help

Dave



---------------------------------------------------------------
This communication and the information it contains is intended for the person 
or organisation to whom it is addressed. Its contents are confidential and may 
be protected in law. If you have received this e-mail in error you must not 
copy, distribute or take any action in reliance on it. Unauthorised use, 
copying or disclosure of any of it may be unlawful. If you have received this 
message in error, please notify us immediately by telephone or email.

Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the 
risk of virus transmission through email and therefore any files sent via 
e-mail will have been checked for known viruses. However, you are advised to 
run your own virus check before opening any
attachments received as Flexipol Packaging Ltd will not in any event accept any 
liability whatsoever once an e-mail and/or any attachment is received.

It is the responsibility of the recipient to ensure that they have adequate 
virus protection.

Flexipol Packaging Ltd.
Unit 14 Bentwood Road
Carrs
Industrial Estate
Haslingden
Rossendale
Lancashire
BB4 5HH

Tel:01706-222792
Fax: 01706-224683
www.Flexipol.co.uk
---------------------------------------------------------------

Terms & Conditions:

Notwithstanding delivery and the passing of risk in the goods, the property in 
the goods shall not pass to the buyer until the seller
Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds 
payment in full of the price of the goods and all other goods agreed to be sold 
by the seller to the buyer for which payment is then due. Until such time as 
the property in the goods passes to the buyer, the buyer shall hold the goods 
as the seller's fiduciary agent and bailee and keep the goods separate from 
those of the buyer and third parties and properly stored protected and insured 
and identified as the seller's property but shall be entitled to resell or use 
the goods in the ordinary course of its business. Until such time as the 
property in the goods passes to the buyer the seller shall be entitled at any 
time

-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Paul H. Tarver
Sent: 16 November 2017 04:58
To: [email protected]
Subject: RE: SQLite Problem - DSN-less Connection Doesn't Create A File

New details.

I rebooted my computer and tried to use SQLSTRINGCONNECT again and this time, a 
window opened which is the same window you would see if you try to create a 
DSN. So I have no idea why I got a valid handle no matter what I tried earlier 
because after the reboot, nothing I try will give me anything other than the 
SQLite3 ODBC Driver Connect window.

I simplified the connection string command to this:

liH = SQLSTRINGCONNECT("DRIVER={SQLite3 ODBC
Driver};DBNAME=T:\f1;SyncPragma=NORMAL;Timeout=100000;")

Executing this line immediately opens the SQLite3 ODBC Driver Connect window. 
The Data Source Name is blank and the Database Name is blank. The timeout and 
the Synch Mode fields are populated with 100000 and NORMAL but I have no idea 
if those are defaults or coming from the connection string.

If it helps, I'm using the 32-bit ODBC driver on a 64-bit Windows 7 development 
box.

PS: T:\ is a valid volume and I have also tried c:\temp\f1.

Paul H. Tarver
Email: [email protected]


-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Paul H.
Tarver
Sent: Wednesday, November 15, 2017 6:14 PM
To: [email protected]
Subject: SQLite Problem - DSN-less Connection Doesn't Create A File

Ok, I give up. I've been using Whil Hentzen's book "Using SQLite to Bypass The 
2GB .DBF Filesize Limit" for a project I'm trying to develop and I have some 
weird behavior going on.



I'm trying to use SQLite3 to deal with an import file that will have 350+ 
columns. I've been using the the examples and doing everything via the 
SQLite3.exe command prompt works as documented. I've also worked out a SQL 
script using SQLite Expert to drop a table if it exists, create an empty table 
and the corresponding indexes. Up to this point everything worked as expected.



However, now I'm trying to migrate this code into VFP9 using SQL Pass-Through, 
but here's what I'm running into:



If I create a DSN using the ODBC drive and then use SQLCONNECT('dsn-name'), the 
connection is made and if the database file "trnslate.db" doesn't already exist 
it is created in the folder I designated in the Database Name field of the DSN.



However, if I create DSN-Less connection (SQLSTRINGCONNECT) using the 
connection string I get back using SQLGETPROP(lnhandle,"ConnectString") , I get 
a handle, but it is to a "trnslate.db" database that doesn't contain the table 
I previously created and if the "trnslate.db" table doesn't already exist in 
the designated folder, it is NOT created on the hard drive.
However, it apparently IS created in memory. I can create a table and issue a 
select command and get back the results I expect, but a database file is NEVER 
physically created on the hard drive which I need to do for my purposes.



Here is some sample code to see if you can tell me where I'm going wrong:



liH = SQLSTRINGCONNECT(    "DRIVER=SQLite3 ODBC Driver;" + ;

                                                "DBNAME=T:\trnslate.db;" + ;

                                                "PWD=;" + ;

                                                "StepAPI=0;" + ;

                                                "SyncPragma=;" + ;

                                                "NoTXN=0;" + ;

                                                "Timeout=;" + ;

                                                "ShortNames=0;" + ;

                                                "LongNames=0;" + ;

                                                "NoCreat=0;" + ;

                                                "NoWCHAR=0;" + ;

                                                "FKSupport=0;" + ;

                                                "JournalMode=;" + ;

                                                "OEMCP=0;" + ;

                                                "BigInt=0;" + ;

                                                "JDConv=0;" + ;

                                                "TraceFile=;")



SQLExec(m.liH, "create table EmplImport (id int primary key, dummy
varchar(50));")

SQLExec(m.liH, "insert into EmplImport (id, dummy) values (1,'testing');")

SQLExec(m.liH, "select * from EmplImport;",'dbtest')



SQLDISCONNECT(liH)



I've tried this process about hundred differ ways with different combinations 
of paired keys in the connection string without success. I've used a DSN-less 
connection program that I wrote which works perfectly with SQL, MySQL and 
others and though I never fail to get a handle; the database file never 
physically exists in any path on the hard drive. Complete searches of my hard 
drive for the database name yield no results



The code above gives me a value for m.liH which is greater than zero, I never 
get errors thrown, I always get a valid handle, the table can be created, the 
data inserted and I get a cursor back from the select named 'dbtest' with the 
exact data inserted on the previous line.



I've been on this for about six hours and I'm no closer to making this work as 
a DSN-less project even though Whil seemed to imply in the book that this was 
his preferred method of doing things.



HELP!



Paul H. Tarver
Email:  <mailto:[email protected]> [email protected]







--- StripMime Report -- processed MIME parts --- multipart/alternative
  text/plain (text body -- kept)
  text/html
---

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to