Re: How to list tables in an SQL database
Jan- Tuesday, January 27, 2004, 2:01:48 AM, you wrote: The only way I know of to get a list of tables from MSAccess with a direct SQL statement is: SELECT * from MSysObjects where type=6; -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: How to list tables in an SQL database
--- Mark Wieder [EMAIL PROTECTED] wrote: Jan- Tuesday, January 27, 2004, 2:01:48 AM, you wrote: The only way I know of to get a list of tables from MSAccess with a direct SQL statement is: SELECT * from MSysObjects where type=6; -- -Mark Wieder Thanks Mark -- if anyone else knows similar SQL statements for other databases than MySQL, Oracle, Valentina and now Access : don't hesitate to post them to the list or email them to me directly :-) Jan Schenkel. = As we grow older, we grow both wiser and more foolish at the same time. (La Rochefoucauld) __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: How to list tables in an SQL database
Thanks again Jan, I very much appreciate your in-depth knowledge of the secrets of Rev! My tests, which I performed on ODBC connections both local (MS Access) and over the Internet (MS SQL), show that the revdb_tablenames() function does exist (i.e. no error message when called), but the response is always empty. This is strange, because I can manipulate the connected databases very successfully with all the other revdb funtions and commands, so I'm not sure what is going wrong here. I tried the exact example you mailed me and the response was empty. Perhaps this is why the function isn't documented, maybe it's not properly supported? The only other clue I have is that when using the Automatic DB Query form, it too fails to list the database tables. Could it be connected with something in my local setup or do others experience the same problem? Regards Roger Kingston Hi Roger, Indeed I was referring to an automatic query from the Query Builder. If you're not using that, you could try the 'revdb_tablenames' function ; unfortunately that didn't get an entry in the docs either. So assuming tConnectionID is the ID of a connection to your database, try this : -- put revdb_tablenames(tConnectionID) into tTables answer tTables -- Hope this helped, Jan Schenkel. = As we grow older, we grow both wiser and more foolish at the same time. (La Rochefoucauld) __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: How to list tables in an SQL database
Jan, Thanks for your guidance. I'll give it a try shortly. Just to clarify, when you say, use the name of an existing query do you mean the ID number generated by a RevDBquery or are you referring to an automatic query from the Rev Query Builder? Sorry for submitting this question three times, but I was getting 'mailbox full' rejections. Regards Roger Kingston 8 Parsons Walk Clifton Campville Tamworth B79 0DL email: [EMAIL PROTECTED] -Original Message- From: Jan Schenkel [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:52 To: [EMAIL PROTECTED]; How to use Revolution Subject: Re: How to list tables in an SQL database --- Roger Kingston [EMAIL PROTECTED] wrote: All, I've had a good deal of success using Rev 2's revdb functions, but would like to be able to get a list of tables belonging to a database that I have connected to. Looking in the code behind the Rev Database Query builder, there is a function: revTableNamesOfQuery() which looks promising, but it is not documented and I'm too dumb to figure out how to use it. Any suggestions? Roger Kingston Hi Roger, The trick is to use the name of an existing query that connects to the database whose table names you want ; so suppose you have a query Foobar : put revTableNamesOfQuery(Foobar) into tNames answer tNames Hope this helped, Jan Schenkel. = As we grow older, we grow both wiser and more foolish at the same time. (La Rochefoucauld) __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: How to list tables in an SQL database
--- Roger Kingston [EMAIL PROTECTED] wrote: All, I've had a good deal of success using Rev 2's revdb functions, but would like to be able to get a list of tables belonging to a database that I have connected to. Looking in the code behind the Rev Database Query builder, there is a function: revTableNamesOfQuery() which looks promising, but it is not documented and I'm too dumb to figure out how to use it. Any suggestions? Roger Kingston Hi Roger, The trick is to use the name of an existing query that connects to the database whose table names you want ; so suppose you have a query Foobar : put revTableNamesOfQuery(Foobar) into tNames answer tNames Hope this helped, Jan Schenkel. = As we grow older, we grow both wiser and more foolish at the same time. (La Rochefoucauld) __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution