473,809 Members | 2,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Initialize a Table


Hi,

I'd like to initialize a table.
This is the code:

With rstArtrprt
If .State = 1 Then .Close
.Open "Delete * From Artrprt", cnnOdbc, adOpenKeyset,
adLockOptimisti c
End With

I get an Sql Syntax error. What should I do?
Jul 23 '05 #1
2 2402
Joel wrote:
"Delete * From Artrprt"
I get an Sql Syntax error. What should I do?


There's no * syntax for the DELETE statement; there is no need for it,
since you can't delete individual columns, you can only delete whole
rows. You probably want "Delete From Artrprt".

Review the documentation for DELETE for more information:
http://dev.mysql.com/doc/mysql/en/DELETE.html

Tip: when deleting the entire contents of a table, if there are a lot of
data in the table, you might find it is quicker to use "DROP TABLE
Artrprt" and then recreate it with your original "CREATE TABLE". Either
way will work.

Regards,
Bill K.
Jul 23 '05 #2

Thank you Bill

"Bill Karwin" <bi**@karwin.co m> wrote in message
news:cs******** *@enews3.newsgu y.com...
Joel wrote:
"Delete * From Artrprt"
I get an Sql Syntax error. What should I do?


There's no * syntax for the DELETE statement; there is no need for it,
since you can't delete individual columns, you can only delete whole
rows. You probably want "Delete From Artrprt".

Review the documentation for DELETE for more information:
http://dev.mysql.com/doc/mysql/en/DELETE.html

Tip: when deleting the entire contents of a table, if there are a lot of
data in the table, you might find it is quicker to use "DROP TABLE
Artrprt" and then recreate it with your original "CREATE TABLE". Either
way will work.

Regards,
Bill K.

Jul 23 '05 #3

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

Similar topics

6
9094
by: SamMan | last post by:
Is there an easy way to re-initialize an array, other than looping through it's length and setting the values to null, or ""? Would unset() be a wise choice? Thanks again -- SamMan
3
4942
by: shama.bell | last post by:
Hello, Can I do something like this? table = {} table = 0x0 Where 32 specifies rows and 16 specifies columns and i am trying to initialize it to zero
10
3529
by: Fred Ma | last post by:
Are there any reasons that would make it bad for C++ to allow simultaneous declaration and initilization of member data? Current way: ------------ class DerivedClass : BaseClass { { enum { lengthSV=16 }; // Length of SomeVector vector<double> SomeVector;
4
38259
by: Mark Hannon | last post by:
I am trying to initialize an array only once so it can be seen & used by any functions that need it. As I understand it, if a variable is declared by itself outside of any functions, its scope is global and any functions should be able to access it. I have been having trouble getting this to work. In the 1st of the 2 examples below I initialize the Array "initArray" with 4 form text fields. When I try to use initArray inside either of...
3
2127
by: dpriver | last post by:
I have to initialize a huge constant array of structures(60000~100000), used as a lookup table , but it failed with System.InvalidProgramException when the items reach 18400. and if I change the item type from struct to class, the threshold is 35000 . It seems that there a size limition when initialize constant in CLR. Is there any configurable parameters can be used to increase this limition in C# compiler or .NET framework. Or I'm...
1
4516
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a checkbox and I can't get it to default to checked. I tried radiobuttons and experienced the same result.. can't start them as checked. The really frustrating thing is that I set the attributes of other input controls in the Init() with no problem. ...
8
2004
by: bryan | last post by:
I'm using the UIP App block and I have overridden the Initialize method, but my override never gets called. Here's the code: public override void Initialize(TaskArgumentsHolder args, ViewSettings settings) { base.Initialize (args, settings); Logger.Write("Initialize");
1
1766
by: thread | last post by:
Hi all, is it posible to initialize the format of a table on a make table i need to have a field that has double variable is it posible?
1
7399
by: westlaker | last post by:
The declaration is: 1 2 struct ListNode; 3 typedef struct ListNode *Position; 4 typedef Position List; 5 struct HashTbl; 6 typedef struct HashTbl *HashTable; 7 8 struct ListNode{ 9 char name;
0
10639
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10383
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
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
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
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
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
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.