|
-
Feb 9th, 2003, 06:56 PM
#1
Thread Starter
Addicted Member
ADODB & MySQL [RESOLVED]
cn.Execute("Insert Into Table1 Values('value')")
OK Its vorking.
How about:
For a=1 to 100
cn.Execute("Insert Into Table1 Values('value')")
next a
not all 100 values are inserted because of flood
Question: How to insert all 100 values?
Last edited by GameBit; Feb 10th, 2003 at 07:39 AM.
P.S. Sorry for my poor English...
-
Feb 10th, 2003, 01:16 AM
#2
GameBit,
What does Table1 look like? How is it defined? Indexes? PrimaryKey?
I have never used an SQL Insert statement without a field name. I am suprised it works.
-
Feb 10th, 2003, 04:57 AM
#3
Thread Starter
Addicted Member

Simle table.
Name |tinytext,Primary,Index,Unique
P.S. Sorry for my poor English...
-
Feb 10th, 2003, 05:07 AM
#4
VB Code:
cn.Execute("Update Table1 set tinytext='value'")
-
Feb 10th, 2003, 05:08 AM
#5
Your code tries to insert 100 records with the same value, while the field only excepts unique values. I guess only the first insert statement succeeds.
-
Feb 10th, 2003, 05:11 AM
#6
Thread Starter
Addicted Member
Originally posted by Lightning
VB Code:
cn.Execute("Update Table1 set tinytext='value'")
Problem not there.
1. Your code updates record
2. Even if i want to update 100 records with loop MySQL counts is as flood
P.S. Sorry for my poor English...
-
Feb 10th, 2003, 05:12 AM
#7
Thread Starter
Addicted Member
Originally posted by Frans C
Your code tries to insert 100 records with the same value, while the field only excepts unique values. I guess only the first insert statement succeeds.
No. It inserts about 20 of them. Problem not here. I'm talking about how to connect lot of querys to 1 line and only then send it to MySQL
P.S. Sorry for my poor English...
-
Feb 10th, 2003, 07:37 AM
#8
Thread Starter
Addicted Member
OK. I found it mysqlf. Thanx to everyone.
Answer:
cn.Execute("Insert Into Table1 Values('value'),('value'),('value')")
P.S. Sorry for my poor English...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|