How to set up and Use an Access database
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Rick Lipkin wrote:Why when I try to open a recordset and the sql statement does not find any results .. can I not try to trap a 'no find' situation ..
Code: Select all
IF oRs:EOF
// no records
ENDIF
Code: Select all
IF oRs:RecordCount = 0
// no records
ENDIF
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Enrico
I think I came to that same conclusion .. many relational tables .. just apply insert updates to each instead of combining them all into one join ..
I can tell you .. this exersize has been a valuable lesson .. but thinking down the road .. I was toying with the idea of sqlrdd for a Ms Sql project coming up ..
Any feelings on ADO vs ( perhaps ) the sqlrdd ?? ... what has to be on the client to make the connection ?? .. for ms sql that is ?? I am very pleased with ADO speed and recordsets..
Thanks
Rick Lipkin
I think I came to that same conclusion .. many relational tables .. just apply insert updates to each instead of combining them all into one join ..
I can tell you .. this exersize has been a valuable lesson .. but thinking down the road .. I was toying with the idea of sqlrdd for a Ms Sql project coming up ..
Any feelings on ADO vs ( perhaps ) the sqlrdd ?? ... what has to be on the client to make the connection ?? .. for ms sql that is ?? I am very pleased with ADO speed and recordsets..
Thanks
Rick Lipkin
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
An ADORDD would be a wrapper to ADO and could be very useful to keep xBase syntax. But conceptually xBase and SQL are two very different beasts and I'm still not sure if xBase syntax is the right path to follow.Rick Lipkin wrote:Any feelings on ADO vs ( perhaps ) the sqlrdd ?? ... what has to be on the client to make the connection ?? .. for ms sql that is ??
EMG
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Enrico
One last ( I hope ) question .. I am using your :filter suggestion for locate records .. is there a :find() or :locate() method in ADO .. I just want to 'seek' a record in a recordset and move the pointer to that record ..
Also .. it appears that a recordset is ( like ) a 'local cursor' .. what are the visability of updates from one workstation recordset to another workstation ( recordset ) that may have the same table open .. does the UPDATE clause on the listbox allow the recordsets to be refreshed from the table .. or is it once the recorset is created .. it never goes back to the origional table for refreshes ??
Thanks again .. I will be converting a large dbfcdx app soon to ms sql .. I know if I go the ADO route i will have to re-write a good bit of code .. but a 'wrapper' ADO rdd would be nice...
Rick Lipkin
One last ( I hope ) question .. I am using your :filter suggestion for locate records .. is there a :find() or :locate() method in ADO .. I just want to 'seek' a record in a recordset and move the pointer to that record ..
Also .. it appears that a recordset is ( like ) a 'local cursor' .. what are the visability of updates from one workstation recordset to another workstation ( recordset ) that may have the same table open .. does the UPDATE clause on the listbox allow the recordsets to be refreshed from the table .. or is it once the recorset is created .. it never goes back to the origional table for refreshes ??
Thanks again .. I will be converting a large dbfcdx app soon to ms sql .. I know if I go the ADO route i will have to re-write a good bit of code .. but a 'wrapper' ADO rdd would be nice...
Rick Lipkin
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Rick Lipkin wrote:I am using your :filter suggestion for locate records .. is there a :find() or :locate() method in ADO .. I just want to 'seek' a record in a recordset and move the pointer to that record ..
Code: Select all
oRs:Find( "Cliente LIKE 'A%'" )
http://msdn.microsoft.com/library/defau ... erence.asp
It depends on the cursortype specified in the Open() method.Rick Lipkin wrote:Also .. it appears that a recordset is ( like ) a 'local cursor' .. what are the visability of updates from one workstation recordset to another workstation ( recordset ) that may have the same table open .. does the UPDATE clause on the listbox allow the recordsets to be refreshed from the table .. or is it once the recorset is created .. it never goes back to the origional table for refreshes ??
EMG
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Enrico
Thank you VERY much .. I think you have the right open parameters set 1,3 .. from what I can tell .. visibility for edits are there and adopenkeyset supports the absolute position for records and top and bottom... where adopendynamic does not ..
I did see a :resync method .. going to have to set up a share on my home network here to test ..
I do find Antonio's comment interesting on ado wrappers intergrated into an RDD .. my only concern ( moving into a ms sql world soon ) .. what ado engine would have to be loaded on the workstation clients for MS Sql ?? .. I don't think MS office loads an ADO client for that particular connection ??
Rick Lipkin
Thank you VERY much .. I think you have the right open parameters set 1,3 .. from what I can tell .. visibility for edits are there and adopenkeyset supports the absolute position for records and top and bottom... where adopendynamic does not ..
I did see a :resync method .. going to have to set up a share on my home network here to test ..
I do find Antonio's comment interesting on ado wrappers intergrated into an RDD .. my only concern ( moving into a ms sql world soon ) .. what ado engine would have to be loaded on the workstation clients for MS Sql ?? .. I don't think MS office loads an ADO client for that particular connection ??
Rick Lipkin
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
I'm using the following connection string:
EMG
Code: Select all
"Provider=sqloledb;Data Source=ipaddress;User Id=userid;Password=password"