Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bhavbhuti Nathwani
  Where is Bhavbhuti Nathwani?
 Rajkot
 India
 Bhavbhuti Nathwani
 To: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 Tags
Subject: RE: ODBC returns 'not a table' error
Thread ID: 268968 Message ID: 269031 # Views: 32 # Ratings: 0
Version: Visual FoxPro 9 Category: ODBC, ADO and OLEDB
Date: Friday, July 16, 2010 7:16:02 AM         
   


> > Hi all
> >
> > I use Report Manager as the reporting mechanism. It thus relies on ODBC to connect to the free VFP tables created to report in this instance. The following account ledger module creates a free table, which I then populate with records, thus then used in Report Manager.
> >
> >
*** create the temp table for the ledger
> > CREATE TABLE (THIS.cCurLedger) FREE ;
> > 	(iOrder I ;
> > 		, iPID I ;
> > 		, iGID I ;
> > 		, tDt T ;
> > 		, iAcctID I ;
> > 		, bDebit B(THISFORM.nAmtDecimals) ;
> > 		, bCredit B(THISFORM.nAmtDecimals) ;
> > 		, cSource C(1) ;
> > 		, mNarration M)
> > 
> > USE
> > 
> > USE (THIS.cCurLedger) ALIAS curLedger
> > 

> >
> > Report Manager returns the following error:
> > ---------------------------
> > VSORM repAccountLedger001.REP
> > ---------------------------
> > Curledger:[microsoft][odbc Visual Foxpro Driver]not A Table..
> > ---------------------------
> > OK
> > ---------------------------
> >
> > I have a similar stock ledger module with the exact same structure (slightly diff. field names) and that module works very well. I am not sure why this same structure fails in ODBC.
> >
> > Please advise
> >
> > Thanks and regards
> > Bhavbhuti
>
> Did you try ADS ODBC driver instead or copy to type fox2x. I think the problem isit doesn't recognize VFP9 table (or maybe you create an empty table in VFP6 and use a copy of it when you need?).
>
> PS: I don't understand why it would use ODBC but not OLEDB.
>
> Cetin Basoz
>
> .Net has got better.Think about moving - check my blog:
> Blog (main)
> Blog (mirror)


Not in this case, but yes for other cases I had sent the SELECT to a FOX2X file and things became fine. What confuses me is why a similar structure works for another module in the same app and not for this?

I am not sure if Report Manager will use OLE DB. I use "Microsoft DAO" and then provide "Provider=MSDASQL.1;Persist Security Info=False;Data Source=C18_Temp_2442" such a string to it for DSN connection for development purposes. At runtime I pass a connect string to Report Manager's ActiveX component something like

		*** 06/07/2009 Non-DSN connections for VFP Free / Temp Tables
		***            DELETED=OFF to see deleted records
		***            Exclusive=Yes to gain exclusive access
		THISFORM.FillRMCursor("SetDatabaseConnectionString", "TEMP", ;
					"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;" ;
					+ "SourceDB=" + goApp.cJobCursorsFolder ;
					+ ";Exclusive=No; Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO;")

		*** 06/07/2009 Non-DSN connections for VFP Tables DBC
		***            DELETED=OFF to see deleted records
		***            Exclusive=Yes to gain exclusive access
		THISFORM.FillRMCursor("SetDatabaseConnectionString", "VFP", ;
					"Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;" ;
					+ "SourceDB=" + ADDBS(goApp.cPathToDBC) + "vso3.dbc" ;
					+ ";Exclusive=No; NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO;")

		*** 06/07/2009 Non-DSN connections for VFP Views DBC
		***            DELETED=OFF to see deleted records
		***            Exclusive=Yes to gain exclusive access
		THISFORM.FillRMCursor("SetDatabaseConnectionString", "VFPView", ;
					"Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;" ;
					+ "SourceDB=" + ADDBS(goApp.cPathToDBC) + "vso3views.dbc" ;
					+ ";Exclusive=No; NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO;


Never used OLE DB before so will "Microsoft DAO" be able to handle this in Report Manager. Can I have the OLE DB equivalent of DNS and DSN-Less connections?

Thanks for the Advantage Database Server suggestion will keep it in mind to later try if requried.

Please advise

Thanks and regards
Bhavbhuti

ENTIRE THREAD

ODBC returns 'not a table' error Posted by Bhavbhuti Nathwani @ 7/15/2010 6:17:40 PM
RE: ODBC returns 'not a table' error Posted by Cetin Basoz @ 7/15/2010 10:19:18 PM
RE: ODBC returns 'not a table' error Posted by Bhavbhuti Nathwani @ 7/16/2010 7:16:02 AM
RE: ODBC returns 'not a table' error Posted by Cetin Basoz @ 7/16/2010 12:58:59 PM
RE: ODBC returns 'not a table' error Posted by Bhavbhuti Nathwani @ 7/16/2010 2:11:21 PM
RE: ODBC returns 'not a table' error Posted by Bhavbhuti Nathwani @ 7/16/2010 5:19:19 PM
RE: ODBC returns 'not a table' error Posted by Cetin Basoz @ 7/16/2010 10:28:52 PM
RE: ODBC returns 'not a table' error Posted by Bhavbhuti Nathwani @ 7/17/2010 6:40:04 AM