ADO RDD xHarbour
Re: ADO RDD xHarbour
Antonio,
How can I get the complete file name of an open area?
I need this to COPY TO.
How can I get the complete file name of an open area?
I need this to COPY TO.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Code: Select all
#include "dbinfo.ch"
dbInfo(DBI_FULLPATH)
Re: ADO RDD xHarbour
Im facing the following problem:
When we use Date() to place in a date field should it be Date() or Sql Now() ?
If there are several workstations in different time zones and if the field date corresponds for ex. to an order number to have last order number with the last date this might fail.
On other hand working with sql Now() brings also problems that the document might have a date posterior to the actual date which means the doc shouldn't be use before that date.
In the cases where there aren't any relations between numbers and dates can it be always sql Now()?
What is your experience? Can you share it?
When we use Date() to place in a date field should it be Date() or Sql Now() ?
If there are several workstations in different time zones and if the field date corresponds for ex. to an order number to have last order number with the last date this might fail.
On other hand working with sql Now() brings also problems that the document might have a date posterior to the actual date which means the doc shouldn't be use before that date.
In the cases where there aren't any relations between numbers and dates can it be always sql Now()?
What is your experience? Can you share it?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, in adordd.prg you use often:
This code produces a error! STR with len 0 is not allowed?
In some cases the parameter nRecord ist from type "C" and a runtime-error is displayed if following code in adordd.prg is called from tryadordd.prg:In tryadordd the database and table should be: and
Code: Select all
ALLTRIM(STR(nRecord,0))
In some cases the parameter nRecord ist from type "C" and a runtime-error is displayed if following code in adordd.prg is called from tryadordd.prg:
Code: Select all
MSGINFO("Relations in ADO SQL with record number are not allowed! See adordd.prg")
nReturn := ADO_GOTO( aRelInfo[ UR_RI_CHILD ], uResult ) //-> uResult is type "C"
Code: Select all
DbCreate( "table1;"+cPath+"\test2.mdb", ....
Code: Select all
DbCreate( "table2;"+cPath+"\test2.mdb",...
Re: ADO RDD xHarbour
You are absolutely right!Code:
ALLTRIM(STR(nRecord,0))
This code produces a error! STR with len 0 is not allowed?
The strange its that here with xHarbour Set 2008 this is accepted. No error!
Corrected anyway! The length should be 10,0
The nRecord its always N type.In some cases the parameter nRecord ist from type "C" and a runtime-error is displayed if following code in adordd.prg is called from tryadordd.prg:
Code:
MSGINFO("Relations in ADO SQL with record number are not allowed! See adordd.prg")
nReturn := ADO_GOTO( aRelInfo[ UR_RI_CHILD ], uResult ) //-> uResult is type "C"
Unless bookmarks are used and with it the results will be unpredictable. (no defined field as recno)
The ADOGOTO was left there by mistake when we were trying it.
Corrected taken out.
You only (should ) get there if there is a relation and no index.
In tryadordd.prg you're right I changed the dbcreate proposed by Lucas and I forgot to change tryadordd.
Thanks a lot for your comments.
Is adordd working ok for you?
It will be a great help to have your feed back.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, in the command SET ADO LOCK CONTROL SHAREPATH TO cPath RDD TO "DBFCDX" you sets the RDD for tlocks.dbf. In the code of adordd.prg should the extension from the indexfile not hardcoded ("CDX") as if i use another RDD the extension is another one! This hardcoded "CDX" are present on some places!
Little correction: The right text in STATIC FUNCTION ADO_RELEVAL( nWA, aRelInfo ) is "allowed"
In tryadordd.prg the relation should finished after the Do WHILE...
MSGINFO("DOES TABLE1 EXISTS ON DB ?"+CVALTOCHAR(hb_adoRddExistsTable( "table1") )) shows .F. ???
Little correction: The right text in STATIC FUNCTION ADO_RELEVAL( nWA, aRelInfo ) is "allowed"
In tryadordd.prg the relation should finished after the Do WHILE...
MSGINFO("DOES TABLE1 EXISTS ON DB ?"+CVALTOCHAR(hb_adoRddExistsTable( "table1") )) shows .F. ???
Re: ADO RDD xHarbour
byte-one,
Ill change it to IndexExt() and TableExt()
If you want to test it simply place SET RELATION TO or not if you want try it browse fields from 2 areas to see it.
hb_adoRddExistsTable - This only queries the Schema I think if you are using Access it doesn't work.
I didn't do it because who wants access when you can have any SQL database?
Thanks for your info.
Ill change it to IndexExt() and TableExt()
Sorry Im not getting it.Little correction: The right text in STATIC FUNCTION ADO_RELEVAL( nWA, aRelInfo ) is "allowed"
If you want to test it simply place SET RELATION TO or not if you want try it browse fields from 2 areas to see it.
hb_adoRddExistsTable - This only queries the Schema I think if you are using Access it doesn't work.
I didn't do it because who wants access when you can have any SQL database?
Thanks for your info.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio,
adordd is working with copy to and copy struct when the table source is opened with via adordd.
Thus it goes directly to ado_trans and we have the control to do it either to another table via adordd or to other rdd.
The problem is when the source table is for ex. dbfcdx then _dbcopy executes and calls ado_append and ado_putvalue and I cant find why on the last record it errors after :update() in ado_putvalue.
With this done it will be very easy to export all tables from ex. dbfcdx to any adordd data source.
Can you inform were can I find source __dbcopy ?
adordd is working with copy to and copy struct when the table source is opened with via adordd.
Thus it goes directly to ado_trans and we have the control to do it either to another table via adordd or to other rdd.
The problem is when the source table is for ex. dbfcdx then _dbcopy executes and calls ado_append and ado_putvalue and I cant find why on the last record it errors after :update() in ado_putvalue.
With this done it will be very easy to export all tables from ex. dbfcdx to any adordd data source.
Can you inform were can I find source __dbcopy ?
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
Can you please post last version?.
In that version, dbcreate takes default database name indicated in SET ADO DEFAULT DATABASE TO command?.
Thank you.
Can you please post last version?.
In that version, dbcreate takes default database name indicated in SET ADO DEFAULT DATABASE TO command?.
Thank you.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Re: ADO RDD xHarbour
Lucas,
I think last version posted already does that.
Please try it and inform.
May be you can help me.
Im still with a problems with dates in MYSQL.
1) Edit a date field and place any date ok.
2) Delete that date and leave it blank date ok
3) Edit again and place a new date ok bu if edit iit again and keep the date blank error!
I try with adoshowerror but nothing only unknown error.
Do you have any clue?
How can we set a date field with empty date?
I think last version posted already does that.
Please try it and inform.
May be you can help me.
Im still with a problems with dates in MYSQL.
1) Edit a date field and place any date ok.
2) Delete that date and leave it blank date ok
3) Edit again and place a new date ok bu if edit iit again and keep the date blank error!
I try with adoshowerror but nothing only unknown error.
Do you have any clue?
How can we set a date field with empty date?
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
It´s not working:
After creating a new table:
Error description: (DOS Error 2) DBFCDX/1003 Open error: C:\ADORDD2015\TLOCKS.CDX
Stack Calls
===========
Called from: => ORDLISTADD( 0 )
Called from: ../../../rddord.prg => DBSETINDEX( 0 )
Called from: test.prg => ADO_GETUNLOCK( 2776 )
Also, Append does not work fine.
The first time I append a record:
When appending next records, it seems ok.
It´s not working:
After creating a new table:
Error description: (DOS Error 2) DBFCDX/1003 Open error: C:\ADORDD2015\TLOCKS.CDX
Stack Calls
===========
Called from: => ORDLISTADD( 0 )
Called from: ../../../rddord.prg => DBSETINDEX( 0 )
Called from: test.prg => ADO_GETUNLOCK( 2776 )
Also, Append does not work fine.
The first time I append a record:
When appending next records, it seems ok.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
"AdoRdd Version 1.150515/2"
"AdoRdd Version 1.150515/2"
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.