Subscribe Bookmark RSS Feed

Fast Access to an SQL database

pab

Community Trekker

Joined:

Mar 28, 2012

Hi - I'm trying to retrieve data from an sql database via ODBC. Sample code:

 

Open Database

("Driver={SQL Server};SERVER=RFFABRPT;UID=RfabRpt;",

"SELECT * FROM dbo.vElectricalTestALL

where vclotcode = '33313.0089' and vcOperationName IN ('FNTST','GATST');"

,

test");

The server is located in the US and I am located in the UK. Access speed is prohibitively slow. Is there any way to speed this up? Can JMP use OLEDB?

Thanks, Paul

3 REPLIES
mfisher

Community Trekker

Joined:

Jun 23, 2011

I think you simply need a faster connection.  I can access a Sybase database via ODBC that is 200 miles away, and I get very fast returns (i.e., several thousand rows returned in a few seconds).  We have a T1 connection.

My code is almost identical to yours. 

gbu

Community Trekker

Joined:

Jun 23, 2011

Hello Paul,

Unfortunately, jmp can only connect with ODBC. For application's deployment, it's a bit heavy.

Regards,

Guillaume

pab

Community Trekker

Joined:

Mar 28, 2012

Hi thanks for your input

We eventually traced the issue to the PC using the wrong port; it was using CIFS port 445 instead of port 1433. Fixed by specifying the port in the script:

Open Database(

      "Driver={SQL Server};SERVER=RFFABRPT;UID=RfabRpt;Address=RFFABRPT,1433",

It looks like port 445 was specified due to the install of unrelated software.

Paul