OdbC connector

Richard D. Williams richard at appgrp.net
Thu Dec 19 11:34:51 PST 2013


On 12/16/2013 4:28 PM, ken_wakeman at me.com wrote:
> Does anyone have a example of creating a new file on filepro(5.7.03) on sco
>
> For example ... What would a DSN description format be ?
>
> Same as the fp docs examples ..
>
> Ken
> Sent from my BlackBerry device on the Rogers Wireless Network
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
>
Ken,

Here is mine;

[root at alpha etc]# cat odbc.ini
[fp-connector]
Description           = MySQL connection to 'myroutes' database
Driver                = MySQL
Database              = myroutes
Server                = localhost
User                  = root
Password              = ##############
Port                  = 3306
Socket                = /var/lib/mysql/mysql.sock

You must also edit /appl/fp/MySQLstored_procedures/all.sql.

DECLARE indexCursor CURSOR FOR
                 SELECT `COLUMN_NAME`
                 FROM `INFORMATION_SCHEMA`.`STATISTICS`
                 WHERE   `table_name`    = in_tableName
*AND             `table_schema`  = 'your_database'*
                 AND             `INDEX_NAME`    = in_indexName;

DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;

Then you need to run /appl/fp/MySQLstored_procedures/all.sql against 
your database;

i.e.
# mysql --user=USER --password=PASSWORD --database=DBNAME < 
/appl/fp/MySQLstored_procedures/all.sql

If you have multiple databases you must run this for each one. Make sure 
you edit the all.sql and change
*`table_schema`  = 'your_database'* before you run it.

Here is the filepro setup when you create your table;
ÚÄÄÄÄÄÄÄÄÄODBC Connection ConfigurationÄÄÄÄÄÄÄÄ¿
³                                              ³
³   DATABASE: TXOAG                         þ  ³
³      TABLE: addl_addr                     þ  ³
³        DSN: fp-connector                  þ  ³
³     SERVER: localhost                     þ  ³
³       PORT: 3316     þ                       ³
³       USER: root             þ               ³
³   PASSWORD: ###########      þ               ³
³                                              ³
³                                              ³
ÀÄÄPress  ESC ESC -Test Connection  Del -CancelÙ

Also, make sure the first field, or some field, in your sql table is 
"id" with auto-increment.
This is used by filepro as a "record number".

Any indexes built in the sql will come up automatically in the order 
they are made as A, B, C, etc..
If you need to create indexes here is an example sql;

CREATE INDEX outto_status ON wip_web_test (`outto`,`status`,`status_date`);

If you need to delete an index:

DROP INDEX outto_status ON wip_web_test;

Finally, see all indexes on the table:

SHOW INDEX FROM wip_web_test;

Hope this helps,

Richard D. Williams


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20131219/f7bae5fd/attachment.html 


More information about the Filepro-list mailing list