Search found 115 matches: dataset

Return to advanced search

Re: Refreshing xbrowse when dataset is closed and re-opened

Rao,

This crashes too:

oRs:Open("SELECT FIRST, LAST FROM CUSTOMER WHERE [STATE] = 'NY'", oCn)

This works:

oRs:Open("SELECT FIRST, LAST FROM CUSTOMER WHERE 1 = 1 ", oCn)

James
by James Bott
Thu Jul 15, 2010 6:36 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

ok
the reason mus be that STATE is also a reserved word
And does your copy of customer.dbf contain STATE field?

Can you try this change?
Code: Select all  Expand view
local cSql  := 'SELECT FIRST,CITY,STATE  FROM CUSTOMER WHERE [STATE] = "?" ORDER BY FIRST'

And please don't forget replacing ? with CA or something
by nageswaragunupudi
Thu Jul 15, 2010 6:29 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

This also causes a crash:

oRs:Open('SELECT * FROM CUSTOMER ORDER BY FIRST')

Now it looks like anything more compilcated that just a simple SELECT, causes a crash (no WHERE or ORDER clauses supported).

James
by James Bott
Thu Jul 15, 2010 6:27 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

These both cause it to crash:

Code: Select all  Expand view
  oRs:Open('SELECT * FROM CUSTOMER WHERE STATE ="NY"', oCn)
   oRs:Open([SELECT * FROM CUSTOMER WHERE STATE ='NY'], oCn)


It seems that the WHERE clause is causing the problem.

James
by James Bott
Thu Jul 15, 2010 6:23 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Rao,

OK, I just tried this:

oRs:Open("SELECT * FROM CUSTOMER", oCn)

And it works fine!

So, the problem seems to be with the cSQL statement in your sample code. I don't know why it is working for you and not for me.

James
by James Bott
Thu Jul 15, 2010 6:18 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Rao,

Yes, that code works fine. I also had no trouble with the connection object in your previous sample code.

James
by James Bott
Thu Jul 15, 2010 6:15 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Mr James Can you please test this and see if the connection is opened successfully or not. #include 'fivewin.ch'#include 'xbrowse.ch'#define FWPATH "c:\fwh\samples\"static oCnfunction Main()   local cStr  := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + ; ...
by nageswaragunupudi
Thu Jul 15, 2010 6:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Rao, Please manually ensure that FWPATH exactly points to fivewin samples folder. It should start with drive letter and finally end with backslash. As I mentioned in one of my previous messages, it is correct for my system. #define FWPATH "c:\fwh\samples\" I have just double checked it, a...
by nageswaragunupudi
Thu Jul 15, 2010 6:01 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Oh, and the customer.dbf file does exist in the path. I had already checked that too.

James
by James Bott
Thu Jul 15, 2010 6:00 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Rao, Please manually ensure that FWPATH exactly points to fivewin samples folder. It should start with drive letter and finally end with backslash. As I mentioned in one of my previous messages, it is correct for my system. #define FWPATH "c:\fwh\samples\" I have just double checked it, an...
by James Bott
Thu Jul 15, 2010 5:47 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Mr. James You do not have to install anything. This is Jet driver ( installed on all PCs by default ) and is for working on DBase III tables. It works perfectly for me. Only possibility is that FWPATH may not be correctly pointing to your \fwh\samples folder. When you copy and paste from forums, the...
by nageswaragunupudi
Thu Jul 15, 2010 5:42 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Rick, The simple answer is that I am just trying to run the sample code that Rao published a few messages back in this thread. I have copied it here. It errors out on the oRs:Open() method with an unknown name "open" error. Maybe I have to install some ADO driver? James #include 'fivewin.c...
by James Bott
Thu Jul 15, 2010 5:08 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

James What SQL back end are you using ?? Sql Server, Access ??. Each database has it's own connection string .. how did you set up your oCn ( connection ) .. also .. do not use double quotes in the sql string .. I put single quotes around your 'N' .. or you could use a like statement if you are look...
by Rick Lipkin
Thu Jul 15, 2010 4:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Rao, I tried your sample code (2 messages above) and it errors out on this line. oRs:Open( StrTran( cSql, '?', cState ), oCn ) I note that: oRs := TOleAuto():New( "ADODB.RecordSet" ) Is returning an object, but it doesn't seem to have an Open() method. I don't know much about ADO, so I don...
by James Bott
Thu Jul 15, 2010 2:03 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855

Re: Refreshing xbrowse when dataset is closed and re-opened

Armando wrote:James:

Yes, I'm using ADO, xHarbour, MySql & FWH810. And not problem at all with
oRsHdr:Refresh()

Regards

Yes. I tested and oRecSet:Refresh() does NOT error out.
But refresh method is not documented for ADO.
by nageswaragunupudi
Thu Jul 15, 2010 1:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Refreshing xbrowse when dataset is closed and re-opened
Replies: 67
Views: 16855
PreviousNext

Return to advanced search