millennium.atrex
client/server
Thread Starter: Robb Started: 10/25/2008 1:36 AM UTC
Replies: 6
client/server



Hey Guys,

We just switched or Warehouse to client/server from direct and now the sql query I have that I run daily does not work through Atrex.

Anything you can tell me?

Here is the sql code

drop table if exists restockbf;
drop table if exists restockca;
drop table if exists restockva;
drop table if exists restockfa;
drop table if exists restockgb;
drop table if exists restockkm;
drop table if exists restockpm;
drop table if exists restockps;
drop table if exists restocksa;
drop table if exists restockwk;
drop table if exists restockwo;

select * into restockbf from "c:\atrex\bayfield\invoice" i
  join "c:\atrex\bayfield\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockca from "c:\atrex\cambridge\invoice" i
  join "c:\atrex\cambridge\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockva from "c:\atrex\vaughan\invoice" i
  join "c:\atrex\vaughan\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockfa from "c:\atrex\fanshawe\invoice" i
  join "c:\atrex\fanshawe\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockgb from "c:\atrex\grand bend\invoice" i
  join "c:\atrex\grand bend\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockkm from "c:\atrex\kazmania\invoice" i
  join "c:\atrex\kazmania\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockmp from "c:\atrex\portkazmania\invoice" i
  join "c:\atrex\portkazmania\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockps from "c:\atrex\port stanley\invoice" i
  join "c:\atrex\port stanley\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restocksa from "c:\atrex\sarnia\invoice" i
  join "c:\atrex\sarnia\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockwk from "c:\atrex\walkerrd\invoice" i
  join "c:\atrex\walkerrd\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;

select * into restockwo from "c:\atrex\white oaks\invoice" i
  join "c:\atrex\white oaks\invitem" ii on i.number = ii.number
where i.transdate >= CURRENT_DATE - 14;


drop table if exists bayfieldcode;
drop table if exists cambridgecode;
drop table if exists vaughancode;
drop table if exists fanshawecode;
drop table if exists grandbendcode;
drop table if exists kazmaniacode;
drop table if exists portstanleycode;
drop table if exists maniaportcode;
drop table if exists sarniacode;
drop table if exists walkerrdcode;
drop table if exists whiteoakscode;


select * into BAYFIELDCODE from "c:\atrex\bayfield\code";


select * into CAMBRIDGECODE from "c:\atrex\cambridge\code";


select * into VAUGHANCODE from "c:\atrex\VAUGHAN\code";


select * into FANSHAWECODE from "c:\atrex\fanshawe\code";


select * into GRANDBENDCODE from "c:\atrex\grand bend\code";


select * into KAZMANIACODE from "c:\atrex\kazmania\code";


select * into PORTSTANLEYCODE from "c:\atrex\port stanley\code";


select * into MANIAPORTCODE from "c:\atrex\portkazmania\code";


select * into SARNIACODE from "c:\atrex\sarnia\code";


select * into WALKERRDCODE from "c:\atrex\walkerrd\code";


select * into WHITEOAKSCODE from "c:\atrex\white oaks\code";

Re: client/server
Robb,

We just switched or Warehouse to client/server from direct and
now the sql query I have that I run daily does not work through Atrex.

You are going to need to stay with a direct connection for this query. Client/Server doesn't understand file paths, so it's going to throw up on any of the table references that include a path and you can't specify tables from multiple C/S connections.

--  

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------
Re: client/server

how can i "have my cake and eat it too"

The client/server solution solves connection and speed issue but I really need to be able to run that sql for my daily restocking purposes.

is there a way?

Re: client/server
Robb,

is there a way?

If all of the files are still local, you might be able to get things working by creating 1 additional location with a direct connection that points to the same location that you were running this script in before.   The only real difference that you would need to change in your process would be to make sure that you change the correct location before running the script.

--  

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------
Re: client/server

Hey Terry,

Thanks a million! That seems to solve my problem.

I am wondering if we can keep Atrex in data directory on Warehouse machine where the client/server location is actually pointing to and login from my other 2 machines using client/server setup but login to "new location called restock reporting" all the time on the Warehouse machine. (all machines would be using the same data)

Is there any risk in doing it like this?

Do I make sense?

                                       Robb

Re: client/server
Robb,

Is there any risk in doing it like this?

It is possible to run mixed connection types, but I don't recommend it.  A direct connection can leave sessions and data locks if the application is closed unexpectedly, and even Windows will sometimes hold a file open even after the application using it has closed.  C/S cleans these up after a few minutes, but a direct connection can leave them locked indefinitely until the OS is restarted.

There really isn't any "risk" involved with this situation as the database engine is designed to allow concurrent access from both types, but you do eliminate some of the benefits of client/server.

--  

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------
Re: client/server
ok thanks Terry!