ADS Client Server (SAP)
Re: ADS Client Server (SAP)
I need to see some code.
The eXpress train is coming - and it has more cars.
Re: ADS Client Server (SAP)
Instead I ran some simple tests from the main menu, just selected a random file with 4000 records, tried a sort with the index open, with no index open and then a copy command. The first two did create the file, same number of records, all blanks. I found that on one of the tests I did earlier. The copy to command gave an ace64/6420 error the discovery process failed. So with the current set up, you are correct, a sort will not work.
Is there any known work around other then loading xbase on all sorts,temp indexes...which we won't do. Too many programs (300+) Unless there is a way that may do it in a ch file.
The method I think I found that I never showed you was to load the opmenu on the z-drive in a folder by itself and leave all the other dll's on the t-drive. That appeared to worked normally without the changes made, although not necessarily what the client wants. Just have to set up the desktop shortcut right.
Let me know your thoughts on that method.
thanks.
Is there any known work around other then loading xbase on all sorts,temp indexes...which we won't do. Too many programs (300+) Unless there is a way that may do it in a ch file.
The method I think I found that I never showed you was to load the opmenu on the z-drive in a folder by itself and leave all the other dll's on the t-drive. That appeared to worked normally without the changes made, although not necessarily what the client wants. Just have to set up the desktop shortcut right.
Let me know your thoughts on that method.
thanks.
Re: ADS Client Server (SAP)
I don't understand a thing you said or a thing you are asking.
I'm afraid we are going to have to talk on the phone again.
I'm afraid we are going to have to talk on the phone again.
The eXpress train is coming - and it has more cars.
Re: ADS Client Server (SAP)
Never mind on that test that worked..it did not.
Only issue at this point is if there is a way around the work file and indexes, although it sounds like there is not/
Fred
Only issue at this point is if there is a way around the work file and indexes, although it sounds like there is not/
Fred
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: ADS Client Server (SAP)
I would have to see your code. I have not experienced any unusual things with ADS. Application on ADS server drive, application on local workstation drive, application on RDP server local drive. We have use ADS on netware, OES and windows.
Cliff
Cliff
Re: ADS Client Server (SAP)
Cliff,
the difference may be its server to server, not work station to server. We have to connect via the remote server to the data server path (\\server\........:6262\.....). The reading/updating of current files is fine, but will not create,copy a file or sort. No code needed for our app.
Did various tests opening a small data base and sorting on a field to a new file. The file is either empty, or matching will all blank records.
Update on this, roger, I did a test from the server to sort a small file. No remote server involved using the data directory...same thing, all empty records. Screwy. Something is wrong somewhere.
Update this morning. Used xdot /ac z:\oiswin and it loaded properly, set default to z:\oiswin. Opened a file and sorted to a work file. All records sorted, all records are blank in the work file.
Not sure what else to do.
Another note, the copy to command works, and the index creation works on that new work file.. Appears only the sort is an issue.
final note..does same thing on my local ads server on my c-drive
Cannot get any results for :
sort on anyfield to anyfile
Fred
the difference may be its server to server, not work station to server. We have to connect via the remote server to the data server path (\\server\........:6262\.....). The reading/updating of current files is fine, but will not create,copy a file or sort. No code needed for our app.
Did various tests opening a small data base and sorting on a field to a new file. The file is either empty, or matching will all blank records.
Update on this, roger, I did a test from the server to sort a small file. No remote server involved using the data directory...same thing, all empty records. Screwy. Something is wrong somewhere.
Update this morning. Used xdot /ac z:\oiswin and it loaded properly, set default to z:\oiswin. Opened a file and sorted to a work file. All records sorted, all records are blank in the work file.
Not sure what else to do.
Another note, the copy to command works, and the index creation works on that new work file.. Appears only the sort is an issue.
final note..does same thing on my local ads server on my c-drive
Cannot get any results for :
sort on anyfield to anyfile
Fred
Re: ADS Client Server (SAP)
Roger,
I know we may need to get together on this, so whatever is convenient.
Thanks
I know we may need to get together on this, so whatever is convenient.
Thanks
Re: ADS Client Server (SAP)
In my 32 years as an Xbase programmer, I have never ever used the SORT command.Appears only the sort is an issue.
I need to see why you are doing this.
I'm here all afternoon. Call me.
The eXpress train is coming - and it has more cars.
Re: ADS Client Server (SAP)
After discussing Fred's issue with him on the phone today, I advised him to not use the SORT command but instead to use an ADS SQL statement to create the new database.
eXpress++ has a function named DC_ExecuteSQL(). This function is not documented because it was originally written as a support function that is called by DC_AdsSQLQuery() which IS documented.
Now, it appears that I should document this function for eXpress++ users. I will do this in build 265.
DC_ExecuteSQL() does not use the ADSDBE or DacSession(). Instead it makes ADS API calls that are in ACE32.DLL by using the ADS wrapper functions in _DCADS.PRG. Any ADS SQL statement can be run with this function.
Below is a sample program. You will need the ACE client DLLs to run this program (ACE32.dll, AXCWS32.dll, ADSLOC32.dll). If you are running ADS Server (remote) then you don't need ADSLOC32.DLL.
Unzip the files into to your \exp20\samples\adssql folder and run PBUILD project.
Then run the SqlTest2.Exe to see the result. The SQL statement will create a new file named BALANCES.DBF from a query created from INVOICE.DBF and CUSTOMER.DBF.
eXpress++ has a function named DC_ExecuteSQL(). This function is not documented because it was originally written as a support function that is called by DC_AdsSQLQuery() which IS documented.
Now, it appears that I should document this function for eXpress++ users. I will do this in build 265.
DC_ExecuteSQL() does not use the ADSDBE or DacSession(). Instead it makes ADS API calls that are in ACE32.DLL by using the ADS wrapper functions in _DCADS.PRG. Any ADS SQL statement can be run with this function.
Below is a sample program. You will need the ACE client DLLs to run this program (ACE32.dll, AXCWS32.dll, ADSLOC32.dll). If you are running ADS Server (remote) then you don't need ADSLOC32.DLL.
Unzip the files into to your \exp20\samples\adssql folder and run PBUILD project.
Then run the SqlTest2.Exe to see the result. The SQL statement will create a new file named BALANCES.DBF from a query created from INVOICE.DBF and CUSTOMER.DBF.
Code: Select all
// SqlTest.Prg
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], oBrowse, GetOptions, cServer, cSql, cErrorString
DC_LoadRdds()
DC_ChDir('.\files\data')
FErase('BALANCES.DBF')
TEXT INTO cSql WRAP
SELECT
Invoice.Inv_nmbr as Invoice,
Invoice.Balance as Balance,
Customer.Bill_name as Customer,
Customer.Phone as Phone
INTO Balances
FROM Invoice
LEFT OUTER JOIN Customer ON invoice.cust_nmbr = Customer.cust_nmbr
WHERE Invoice.Balance > 0
ORDER BY balance
ENDTEXT
cServer := 'C:'
cErrorString := ''
DC_ExecuteSQL( cServer, cSql,,,,,,,,,@cErrorString )
IF !Empty(cErrorString)
DCMSGBOX cErrorString
RETURN .f.
ENDIF
USE balances VIA 'FOXCDX'
@ 0,0 DCBROWSE oBrowse ALIAS 'balances' SIZE 100,20 FIT ;
FONT '10.Lucida Console'
DCBROWSECOL FIELD BALANCES->invoice HEADER 'Invoice' WIDTH 10 PARENT oBrowse
DCBROWSECOL FIELD BALANCES->balance HEADER 'Balance' WIDTH 10 PARENT oBrowse PICTURE '9999.99'
DCBROWSECOL FIELD BALANCES->customer HEADER 'Customer' WIDTH 30 PARENT oBrowse
DCBROWSECOL FIELD BALANCES->phone HEADER 'Phone' WIDTH 20 PARENT oBrowse
DCGETOPTIONS RESIZE RESIZEDEFAULT DCGUI_RESIZE_RESIZEONLY
DCREAD GUI FIT TITLE 'Browsing a database created by SQL' OPTIONS GetOptions
RETURN nil
* -----------
PROC appsys ; RETURN
- Attachments
-
- adssql.zip
- (1.1 KiB) Downloaded 623 times
The eXpress train is coming - and it has more cars.
Re: ADS Client Server (SAP)
Roger,
Using your example I did a simple one to test, no options other than creating the file I wanted. Worked fine on my local drive and also in my test environment on the z-drive at our client. Tried from the remote connection and it failed.
Error was 5185 code, local area connections are restricted in this environment.
Appears to be basically the same error ADS had, or is there something in express that can be used to override when doing this operation?
Thanks
Fred
Using your example I did a simple one to test, no options other than creating the file I wanted. Worked fine on my local drive and also in my test environment on the z-drive at our client. Tried from the remote connection and it failed.
Error was 5185 code, local area connections are restricted in this environment.
Appears to be basically the same error ADS had, or is there something in express that can be used to override when doing this operation?
Thanks
Fred