PC Review


Reply
Thread Tools Rate Thread

Database Error

 
 
Don E
Guest
Posts: n/a
 
      11th Aug 2005
I'm using FP 2002 and I am having troble with the Database Results. I have
several tables in my database with each having the name of a year. Example
(1998) How can I use a Form field to select which table to display the
results? I have tried Select * from ::fieldname:: and I get an error.and
the query end up being Select * from 1



 
Reply With Quote
 
 
 
 
Thomas A. Rowe
Guest
Posts: n/a
 
      11th Aug 2005
A better approach is to have a single table for all of the records, and have a field in the table
for the year (the field can not be actually named year, as it is a reserve word), then you can
retrieve data from a single table by year, etc.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

"Don E" <(E-Mail Removed)> wrote in message news:e5$(E-Mail Removed)...
> I'm using FP 2002 and I am having troble with the Database Results. I have several tables in my
> database with each having the name of a year. Example (1998) How can I use a Form field to select
> which table to display the results? I have tried Select * from ::fieldname:: and I get an
> error.and the query end up being Select * from 1
>
>
>



 
Reply With Quote
 
=?Utf-8?B?SmltIEJ1eWVucw==?=
Guest
Posts: n/a
 
      11th Aug 2005
Where did the "1" come from?

Is it possible you have a drop-down list configured along the lines of:

<select size="1" name="fieldname">
<option value="1">2001</option>
<option value="2">2002</option>
<option value="3">2003</option>
</select>

If so, you need to put the full year numbers (table names) in the value=
attributes.

I must observe, however, that this sort of approach is hardly recommended
practice. You should really combine all the yearly tables into one and then
select the year you want.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------Â*-----------------------
|\----------------------------Â*-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------Â*-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------Â*-----------------------
*-----------------------------Â*-----------------------

"Don E" wrote:

> I'm using FP 2002 and I am having troble with the Database Results. I have
> several tables in my database with each having the name of a year. Example
> (1998) How can I use a Form field to select which table to display the
> results? I have tried Select * from ::fieldname:: and I get an error.and
> the query end up being Select * from 1
>
>
>
>

 
Reply With Quote
 
Stefan B Rusynko
Guest
Posts: n/a
 
      12th Aug 2005
The 1 is generated by FP any time you try to use the DBRW to select a table (in Select * from ...)

TBMK
The FP DBRW can not use a conditional table name because it is totally dependent on the webot generated field info from a
predetermine table

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________


"Jim Buyens" <(E-Mail Removed)> wrote in message news:496E4E16-7B34-4D79-8D3A-(E-Mail Removed)...
| Where did the "1" come from?
|
| Is it possible you have a drop-down list configured along the lines of:
|
| <select size="1" name="fieldname">
| <option value="1">2001</option>
| <option value="2">2002</option>
| <option value="3">2003</option>
| </select>
|
| If so, you need to put the full year numbers (table names) in the value=
| attributes.
|
| I must observe, however, that this sort of approach is hardly recommended
| practice. You should really combine all the yearly tables into one and then
| select the year you want.
|
| Jim Buyens
| Microsoft MVP
| http://www.interlacken.com
| Author of:
| *-----------------------------Â*-----------------------
||\----------------------------Â*-----------------------
||| Microsoft Windows SharePoint Services Inside Out
||| Microsoft Office FrontPage 2003 Inside Out
|||----------------------------Â*-----------------------
||| Web Database Development Step by Step .NET Edition
||| Microsoft FrontPage Version 2002 Inside Out
||| Faster Smarter Beginning Programming
||| (All from Microsoft Press)
||/----------------------------Â*-----------------------
| *-----------------------------Â*-----------------------
|
| "Don E" wrote:
|
| > I'm using FP 2002 and I am having troble with the Database Results. I have
| > several tables in my database with each having the name of a year. Example
| > (1998) How can I use a Form field to select which table to display the
| > results? I have tried Select * from ::fieldname:: and I get an error.and
| > the query end up being Select * from 1
| >
| >
| >
| >


 
Reply With Quote
 
novus
Guest
Posts: n/a
 
      13th Aug 2005
"Don E" <(E-Mail Removed)> wrote in message
news:e5$(E-Mail Removed)...
> I'm using FP 2002 and I am having troble with the Database Results. I have
> several tables in my database with each having the name of a year.
> Example (1998) How can I use a Form field to select which table to display
> the results? I have tried Select * from ::fieldname:: and I get an
> error.and the query end up being Select * from 1


I seem to remember that I had problems when I used tables or fields which
started with a digit. I started them with a letter and the problem went
away. That may have been due to my limited knowledge of SQL.

novus


 
Reply With Quote
 
p c
Guest
Posts: n/a
 
      14th Aug 2005

the * only works for selectieng all fields of a table. It does not work
for selecting all tables. Each Select satement must include the name of
the table. If you use table or field names that are reserved words or
include space in their name, you must enclose them in square brackets
for Access, or the delimeter acepted by your database.

E.g SELECT [field1], [fielde],.. FROM [tablename].

...PC

novus wrote:

> "Don E" <(E-Mail Removed)> wrote in message
> news:e5$(E-Mail Removed)...
>
>>I'm using FP 2002 and I am having troble with the Database Results. I have
>>several tables in my database with each having the name of a year.
>>Example (1998) How can I use a Form field to select which table to display
>>the results? I have tried Select * from ::fieldname:: and I get an
>>error.and the query end up being Select * from 1

>
>
> I seem to remember that I had problems when I used tables or fields which
> started with a digit. I started them with a letter and the problem went
> away. That may have been due to my limited knowledge of SQL.
>
> novus
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access error 3197 and JETCOMP.exe error "Error compacting database =?Utf-8?B?Vmlja3k=?= Microsoft Access 2 21st Jul 2007 12:29 AM
Any solution for error message "Could not attach file 'App_Data\Database.mdf' as database 'Database'."? ornit_sagy@yahoo.com Microsoft ADO .NET 0 8th Jan 2007 08:34 PM
Any solution for error message "Could not attach file'App_Data\Database.mdf' as database 'Database'."? ornit_sagy@yahoo.com Microsoft ADO .NET 1 8th Jan 2007 08:12 PM
Excel query of Access database - changed database filename, now error ucdcrush@gmail.com Microsoft Excel Discussion 2 8th Mar 2006 08:42 PM
Database needs repaired or isn't a database file error message =?Utf-8?B?TWFyeWphbmU=?= Microsoft Access 3 6th May 2005 06:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:38 AM.