FoxPro ODBC Table not found - odbc

The FoxPro ODBC on my machine is only able to connect to certain tables in the ODBC Connection. When I try to connect to specific tables in the same connection I receive the error [Microsoft][ODBC Visual FoxPro Driver]Not a table.( #123). However, I am successfully connected to other tables without an issue. I know these tables I am unable to connect to aren't corrupted because I am able to view the data in them using Visual Fox Pro.
Any suggestions would be appreciated.

First I'd use the Visual FoxPro OLEDB driver instead of ODBC. It's faster and more fully featured.
Then check whether the TableValidate setting is affecting it. To check that, back up the data then open the table exclusively in Visual FoxPro and issue the following in the command window:
append blank
go bottom
delete
pack
This will append and then delete a blank record, forcing the header counters to be recalculated. Then try it via the connection.
Also try turning tablevalidate off for the OLE DB driver as follows.
Create a text file called CONFIG.FPW in the same location as vfpoledb.dll, on a 64-bit machine this will be in 'C:\Program Files (x86)\Common Files\System\Ole DB'.
In the text file just put one line:
TABLEVALIDATE=0
And retry.

First: Do not use ODBC driver UNLESS your tables are VFP6 and earlier compatible. The last ODBC driver released was only for 6 and earlier. If you still need to use ODBC then check Sybase ADS driver. It is compatible with later versions too and local mode is for free.les
Second:Be sure that the tables you are trying to open are really not corrupted (not a table error is often occurs when the header info is off by pne record = you can check the details on "Not A table" entry on foxwikis. You might be looking into two different files when you check from VFP and through OLEDB driver. You can specify the fullpath to be sure.

Related

Is there a way to connect ODBC datasource in Knexjs

I have my windows 10 pc with ODBC datasource as my_odbc
This will connect to my remote informix server.
So for I am using this odbc for my local as well as php website development.
I want to use Adonis Js which uses knex.
How to give database connection properties, as to that of mysql, pg, mssql etc.
using odbc data source.
my connection is "DSN=my_odbc;UID=vijayan;PWD=vijayan;"
No.
But you can write your own ODBC client. There was some initial work done for it, but nowadays all new dialects should be added as separate npm modules like described in CONTRIBUTING.md https://github.com/tgriesser/knex/blob/master/CONTRIBUTING.md#i-would-like-to-add-support-for-new-dialect-to-knex-is-it-possible
(I'm not going to copy-paste that boilerplate code here, because it is more probable that knex changes and that linked document changes in compared to knex github getting offline)
Initial work that was done for the support is found here: https://github.com/tgriesser/knex/pull/2116

Error when inserting large CSV into empty tables via Teradata SQL assistant

I have a 6 gig csv and I am trying to load it into Teradata.
So I fire up Teradata SQL assistant, created an empty table and then I turn on Import data mode and try to insert the records into the empty table using
insert into some_lib.some_table
(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
But I always get a failure message around the 600k rows marks that goes
Error reading import file at record 614770: Exception of type
'System.OutOfMemoryException' was thrown.
I think it's because Teradata SQL assistant is trying to load everything into memory on my 4G laptop before trying to send the data to the Teradata server. Is my theory correct? How do I tell Teradata to upload the data in chunks and not try to store everything in local memory?
I believe you are pushing the capabilities of SQL Assistant as a means to load data.
Have you considered installed the Teradata Load Utilities such as FastLoad or MultiLoad on your system?
Another option if you don't want to write scripts for the load utilities would be to install Teradata Studio Express which should provide a mechanism to use JDBC FastLoad to load your data. This would be in the Smart Loader mechanism of Studio Express. You may find this to be more extensible than SQL Assistant using .Net or ODBC.

Unable to connect Access to SQLlite via ODBC

I have an Access 97 database that serves as a front-end, via ODBC and linked tables, to a MySQL database, running under Wiin7-64. (Yes, it does work!) The database contains info about places of worship and pilgrimage in the part of France where I live. In addition, I have tens of thousands of photos of the sites in Photoshop Elements 9. The underlying database engine of PSE9 is SQLite, and interesting data about the photos is there (titles, which ones I like, etc.). I would like to link from Access to the tables in the SQLite database as I do to the MySQL database.
My problem: I am unable to create an ODBC connection to the PSE9 SQLite database. I have done multiple searches via Google, read multiple posts at stackoverflow and elsewhere, tried various suggestions, and still no ODBC connection, neither in the 32bit or 64bit ODBC tools of Win7-64. I'm stumped.
So far, I've
downloaded sqliteodbc.exe from http://www.ch-werner.de/sqliteodbc/ and run it (multiple times)
copied sqlite3odbc.dll, sqlite3.def, sqlite3.dll, and sqlite3.exe to the \windows\system32 folder
entered this command at the Windows command line: "rundll32 c:\windows\system32\sqlite3odbc.dll,install", which produced this error message "Copy c:\windows\system32\sqlite3odbc.dll to c:\windows\system32\sqlite3odbc.dll failed."
When I look at the ODBC and ODBC (32-bit) windows, I don't find a User DSN, System DSN or File DSN for SQLite. Any suggestions?
Thanks,
Harvey in balmy Bordeaux
Whats with all that copying dlls around - you don't need to do any of that. Just download the 32 bit version and double click on it - the driver will be installed. Then find the 32 bit ODBC Administrator (note there are 2 on 64 bit windows and only one is 32 bit), fire it up and create a DSN. You should see sqlite3 in the drivers tab.
DSNs are not there automatically, you have to create them yourself. There should be an "Add" button in the ODBC administrator. Then you select the type of driver "SQLite", and then configure the details in the next dialog.
A DSN normally contains all the configuration information needed to connect to a specific database instance so that all this - which may be different from one database system to the other - can be referenced by one name. That is where the name "Data Source Name" comes from.

Is there a way to connect to an ASA database with Powerbuilder without deploying the ODBC or OLEDB drivers?

What I want is a Powerbuilder application that runs on Windows that runs from a CD (or some other external disk) that can read from an ASA database whose file is located on the same disk. But I want to do so without deploying the ODBC or OLEDB drivers. That is, I do not want to have to copy the driver files to the client's hard disk or add any registry entries. Is this possible?
In the Powerbuilder and ASA documentation they mention something about "embedded database connections" and supposedly you can specify the executable for the database server in the connection string. But that was no help.
When you attempt to connect to a database and "ODBC" is specified for the DBMS property of the transaction object, PowerBuilder is going to want to start loading drivers and looking to an ODBC datasource for the driver's info.
The only thing I can think to try, is to create all the registry entries at run time and point them to the driver files and the .db file on the CD. You might be able to make things easier with a file based datasource on the CD already, but you'll still need to create registry entries to setup the driver details. Then you can remove all those entries when you disconnect/close the application. I don't think you can do this completely without registry entries.
You do have to deploy the ODBC driver, that's how PB talks to SQL Anywhere. You dont have to create a DNS entry though, you can usr a DNSless connection.
http://www.carlprothman.net/Default.aspx?tabid=90#ODBCDriverForSybaseSQLAnywhere
Since you aren't getting much feedback I thought I'd offer this. I've done this with MS Access, but MS Access is much easier to connect to and most Windows PC's are able to connect via File based DSN.
You definitely want to avoid ODBC if at all possible look for File based DSN in ASA, but because it is more of a full database engine I doubt it is possible without ODBC and setting up ODBC via Registry Entries is possible but no fun at all especially if your clients are running different versions of Windows.
Here is the connect string I used for something similar but MS Access. I choose Access for this exact reason, it was for a RPG program and I wanted a database but didn't want to mess with ODBC.
Sample:
"Connectstring='Driver={Microsoft Access Driver
(*.mdb)};UID=abc;PWD=123; Dbq=C:\Program Files\Mafia Manager\mm.mdb;
Exclusive=1;'"

How to make a database service in Netbeans 6.5 to connect to SQLite databases?

I use Netbeans IDE (6.5) and I have a SQLite 2.x database. I installed a JDBC SQLite driver from zentus.com and added a new driver in Nebeans services panel. Then tried to connect to my database file from Services > Databases using this URL for my database:
jdbc:sqlite:/home/farzad/netbeans/myproject/mydb.sqlite
but it fails to connect. I get this exception:
org.netbeans.modules.db.dataview.meta.DBException: Unable to Connect to database : DatabaseConnection[name='jdbc:sqlite://home/farzad/netbeans/myproject/mydb.sqlite [ on session]']
at org.netbeans.modules.db.dataview.output.SQLExecutionHelper.initialDataLoad(SQLExecutionHelper.java:103)
at org.netbeans.modules.db.dataview.output.DataView.create(DataView.java:101)
at org.netbeans.modules.db.dataview.api.DataView.create(DataView.java:71)
at org.netbeans.modules.db.sql.execute.SQLExecuteHelper.execute(SQLExecuteHelper.java:105)
at org.netbeans.modules.db.sql.loader.SQLEditorSupport$SQLExecutor.run(SQLEditorSupport.java:480)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
What should I do? :(
The current version of Zentus SQLiteJDBC is v053, based on SQLite 3.6.1. It will not open a 2.x SQLite database. Perhaps you can use SQLite 2.x command line tool to .dump your database, and the Sqlite3 command line tool to .load it. The use Zentus SQLiteJDBC to access the new SQLite 3.x database.
Alternatively, use a JDBC driver that supports SQLite 2 such as this one.
It's againg me...
I have made two mistakes during my first attempt. After setting CLASSPATH as a system variable (hope I didn’t broke smth else :)), putting sqlite_jni.dll to the system32 folder and correcting JDBC url I have got a success :)
I also have downloaded their SQLite ODBC wrapper. Installed it and made a connection to my SQLite2 database via ordinary and UTF8 based ODBC driver. I also used built in NetBeans JDBC-ODBC Bridge driver to be able to set up this connection.
All three connections have been created but:
ordinary ODBC driver: I see text data in a wrong encoding. All other columns are displayed correctly
UTF8 ODBC driver: I don’t see text data at all. All other columns are displayed correctly
JDBC driver: I don’t see any column at all. "Select * from my_any_table" always returns an empty single column
I have Russian based data in my database.
So...currently I have returned to sqlite command line interface :))

Resources