473,722 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

table name with spaces in RunSQL instruction

Hello all,

I use ACCESS 97.
I want to delete all records of a table "TABLE RESULT" , the name of
which includes spaces.
It seems to me that the correct syntax is as follows :

DoCmd.RunSQL "Delete * FROM 'TAB RESULT';"

Tne table name is enclosed with apostrophes.

I receive the following message : Syntax error in the request. The
request clause is not completed.

Could somebody give me the correct syntax.
Thanks in advance

Maurice

Nov 12 '05 #1
2 9344
Try square brackets [ ] instead of apostrophes.

--
Wayne Morgan
Microsoft Access MVP
"Maurice KRAIT" <mk****@club-internet.fr> wrote in message
news:3F******** *******@club-internet.fr...
Hello all,

I use ACCESS 97.
I want to delete all records of a table "TABLE RESULT" , the name of
which includes spaces.
It seems to me that the correct syntax is as follows :

DoCmd.RunSQL "Delete * FROM 'TAB RESULT';"

Tne table name is enclosed with apostrophes.

I receive the following message : Syntax error in the request. The
request clause is not completed.

Could somebody give me the correct syntax.
Thanks in advance

Maurice

Nov 12 '05 #2


Wayne Morgan a écrit :
Try square brackets [ ] instead of apostrophes.

--
Wayne Morgan
Microsoft Access MVP
OK, it works.
Thank you very much

Maurice


"Maurice KRAIT" <mk****@club-internet.fr> wrote in message
news:3F******** *******@club-internet.fr...
Hello all,

I use ACCESS 97.
I want to delete all records of a table "TABLE RESULT" , the name of
which includes spaces.
It seems to me that the correct syntax is as follows :

DoCmd.RunSQL "Delete * FROM 'TAB RESULT';"

Tne table name is enclosed with apostrophes.

I receive the following message : Syntax error in the request. The
request clause is not completed.

Could somebody give me the correct syntax.
Thanks in advance

Maurice


Nov 12 '05 #3

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

Similar topics

1
3459
by: Rolf Kemper | last post by:
Dear All, I need some help on an XLST. I need to create an XML output from some xml document by XSLT. The top element must contain multiple name spaces. I tried this as an example: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
1553
by: Oggdorf | last post by:
The table names in my database schema have spaces. When the .tab files are created in Visual Studio, the constraint names do not have brackets around them causing a syntax error. Is there a setting to turn brackets on at all times? This is the only situation where it is a problem, all other table name references in all other scripts contain brackets.
6
21013
by: vbnetrookie | last post by:
I have a table name in SQL Server 2000 that has a space in it ex: aim international I had trouble just in the query analyzer with this..I had to place the name in brackets for it to work. But now I'm in Visual Studio .Net 2003 and it gives me another problem. I get the table name from a drop down list selection and send it to a query string. But is gives me this error: *************** Line 1: Incorrect syntax near 'AIM international'.
4
13786
by: dixie | last post by:
I want to write a query where one of the two tables in it is variable and its name is picked up from a text box control on an open form. The query is very simple and is only a select query with three fields, but the problem is that one of its tables varies with the Calendar Year like tblYear2002, tblYear2003, etc. Is there a simple way of doing this? dixie
2
1720
by: Florifulgurator | last post by:
Hello, trying to clean up other´s mess... I´ve replaced some tables (previously linked to another Access DB) with renamed tables linked to a PostgeSQL DB (removed spaces and Ümlauts in names, secured referential integrity). There´s one (probably more) report that doesn´t get the new name:
3
1182
by: Robert A. Boudra | last post by:
I'm working through one of the example data sets in the Visual Basic Resource Kit, and am having a problem with use of a table name that contains spaces. The section of code in the example that I'm having trouble with is as follows: TextBox1.Text = tds.Alphabetical_list_of_products(5).ProductName TextBox2.Text = tds.Alphabetical_list_of_products(5).CategoryName where tds is a Typed Data Set. I noticed that the actual view in the...
5
14772
by: laurentc | last post by:
Dear all, I have several tables based on exactly the same fields (Key/Date/Price1/Price2). I do some statistics on the prices. However, as I have many different tables (the tables are different because I directly import the data from a .csv file), I do not want to create dozens of queries to be able to get the results of the different tables.
11
3815
by: kennthompson | last post by:
Trouble passing mysql table name in php. If I use an existing table name already defined everything works fine as the following script illustrates. <?php function fms_get_info() { $result = mysql_query("select * from $tableInfo") ; for ($i = 0; $i < mysql_num_rows($result); $i++) {
0
1207
by: sudheerdb2 | last post by:
Hi, I am trying xml data processing using Xquery version 9.1 My xml file --------- <?xml version="1.0" ?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
0
8867
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9239
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9158
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4503
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3208
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 we have to send another system
2
2606
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2148
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.