473,473 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

table

I've been working with MS Access for 2 days now, so please bear with me
if I don't know all the lingo and technical terms.

I was assigned to work on an existing Access database, which contains
about a dozen Linked ODBC Tables (from a SQL Server database), and one
"regular" table. By regular I mean it's native to Access, and not tied
to any outside sources - let's call this table "MainTable". The Access
database contains forms, reports and queries, all based on "MainTable".

Obviously, "MainTable" is derived from the linked ODBC tables right?
Right??? But how the heck can I see the SQL statement used to populate
"MainTable"?? At some point, someone had to write some sort of a SQL
statement to query the data from the sql server tables and throw it in
the "MainTable". Is there something I'm not understanding here? I
just want to see where the data from MainTable comes from. Also,
provided the data does come from the SQL Server database, is there a
real-time data update to Maintable whenever a modification to the SQL
Server tables is made?

Basically, I want to see the SQL Statement used to populate MainTable.
When I have this, I can tweak the sql statement to my liking, and
modify the query to refine the data.

Please help me!

Thanks,
Marc

Nov 2 '06 #1
2 1206
If you have ODBC linked tables you can use the DAO tabledef object to
check the detail of the connection like this:

Dim DB As DAO.Database, tdf As DAO.TableDef
Set DB = CurrentDB
Set tdf = DB.TableDefs("linkTbl1")
Debug.Print tdf.Connect

this returns something like:
ODBC;DSN=someDSN;APP=Microsoft Office
2003;WSID=workstationname;Database=someSqlSvrDB;Tr usted_Connection=Yes

The source table on the sqlSvr could be either a regular table (there is
no sql here) or a view (which would be based on a regular table), Only
forms and reports can be based on stored procedures.

To change anything underlying the linked tables you would have to go to
the sql server. You could use Enterprise Manager or Query Analyzer
(sql2000) or Management Console (sql2005).

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 2 '06 #2
"marcsirois" <ma********@gmail.comwrote
and one "regular" table. By regular I mean it's
native to Access, and not tied to any outside
sources - let's call this table "MainTable". The
Access database contains forms, reports and
queries, all based on "MainTable".

Obviously, "MainTable" is derived from the
linked ODBC tables right? Right???
There's nothing in what you have written so far to support this conclusion.
It is not necessarily so, and would be (at least) an "unusual" way to design
the datastore.
But how the heck can I see the SQL statement
used to populate "MainTable"?? At some point,
someone had to write some sort of a SQL state-
ment to query the data from the sql server tables
and throw it in the "MainTable".
It's not necessarily true that the MainTable was populated from SQL Server
tables; therefore, it's not necessarily true that you could see an SQL
Statement or Query. Even if it were populated from SQL Server tables, it
could have been accomplished manually.
Is there something I'm not understanding here?
If that table's Source was an SQL Server table, the normal approach would be
to link a TableDef to the SQL Server table, or perhaps create a Query using
one or multiple linked tables as data sources for the Query.

I just want to see where the data from
MainTable comes from. Also, provided
the data does come from the SQL Server
database, is there a real-time data update
to Maintable whenever a modification to
the SQL Server tables is made?
No, there is no provision for such an update. That is why such tables are
usually linked directly to the SQL Server tables.
Basically, I want to see the SQL Statement
used to populate MainTable. When I have this,
I can tweak the sql statement to my liking, and
modify the query to refine the data.
I once worked with an old-school marketing rep who had a saying "No matter
how much you want to sell purple dogfood, if the dogs won't eat purple
dogfood, no one's going to buy it." His point was, of course, that your
wanting something, no matter how much you want it, isn't necessarily going
to make it so.

Fact is, you are making an assumption which may or may not be true -- we
don't know; we can't see your database, and if we could and the MainTable
were derived from SQL tables, we still might well not be able to discover
the SQL because it isn't necessarily part of the database you have in hand.
Please help me!
The help you want may not be possible. Certainly we do not have enough
information to be of assistance.

Larry Linson
Microsoft Access MVP
Nov 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gaz | last post by:
Hi, I need to have a table nested within another table. The tables are alongside each other visually speaking, and the nested table (on the right) can vary in size. My problem is that when the...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
3
by: Terrence Brannon | last post by:
I don't know what Postgres considers a relation and had no intention of creating one when piping my schema to it... I always DROP TABLE before CREATE TABLE, so here are the ERRORS emitted when...
4
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
4
by: Simone Battagliero | last post by:
I wrote a program which inserts and finds elements in an hash table. Each element of the table is a dinamic list, which holds all elements having the same hash value (calculated by an int...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
76
MMcCarthy
by: MMcCarthy | last post by:
Normalisation is the term used to describe how you break a file down into tables to create a database. There are 3 or 4 major steps involved known as 1NF (First Normal Form), 2NF (Second Normal...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
5
by: wugon.net | last post by:
question: db2 LUW V8 UNION ALL with table function month() have bad query performance Env: db2 LUW V8 + FP14 Problem : We have history data from 2005/01/01 ~ 2007/05/xx in single big...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.