473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

SIMPLE SQL ? Large insert

18
my SQL statement works when I do a small part, but I have 83 fields I need to insert into a table in Access and Im try to remember how to do this. I know it is really easy.

strSQL = "INSERT INTO Table1 " _
& "(user_company, user_fname, user_lname) VALUES " _
& "('" & arrFill(1) & "', '" & arrFill(2) & "', '" & arrFill(3) & "');"

but how do I make it multiple lines? When my variables rap to the next line, Im not sure how to correctly code it.

strSQL = "INSERT INTO Table1 " _
& "(user_company, user_fname,
user_lname) VALUES " _
& "('" & arrFill(1) & "', '" & arrFill(2) & "', '" & arrFill(3) & "');"

Thank you
Nov 9 '07 #1
2 1131
iburyak
1,017 Expert 512MB
Try this:

Expand|Select|Wrap|Line Numbers
  1. strSQL = "INSERT INTO Table1 " 
  2. strSQL = strSQL & "(user_company, user_fname," 
  3. strSQL = strSQL & "user_lname) VALUES " 
  4. strSQL = strSQL &  "('" & arrFill(1) & "', '" & arrFill(2) & "', '" & arrFill(3) & "');"
Good Luck.
Nov 9 '07 #2
debasisdas
8,127 Expert 4TB
You need to concadinate the each line of SQL statment to a variable and finally execute that.

If using from Vb 6.0 ,you can use the _ (underscore) at the end of each line to go to next line.
Nov 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Jason | last post by:
Hi, I have a few million data items being received by my program and I wish to store them in a list, with each item being inserted in any position in the list. Any performance tips so that my...
3
by: Joachim Klassen | last post by:
Hi all, first apologies if this question looks the same as another one I recently posted - its a different thing but for the same szenario:-). We are having performance problems when...
0
by: Carlo Razzeto | last post by:
Hello there, I am currently working on an email archiving program that is supposed to copy the entier contents of an email (as downloaded via webdav from exchange) into a mysql database. This...
5
by: Louis LeBlanc | last post by:
Hey folks. I'm new to the list, and not quite what you'd call a DB Guru, so please be patient with me. I'm afraid the lead up here is a bit verbose . . . I am working on an application that...
4
by: Emin | last post by:
Dear Experts, What is the best way to do a large insert WITHOUT having direct access to the machine SQL Server is running on? For example, imagine I want to insert something like 20,000 records....
1
by: tim999 | last post by:
Hi everyone, I've been working on a large data extract and was wandering if anyone could take a look at the following code and offer any reasons why it takes such a long time compared to when i...
7
by: shivapadma | last post by:
I want explanation for CLOB datafield 1.I created clobtable with the query create table clobexample(id number,text CLOB); 2.I tried to insert very large text by the following query insert...
10
by: nflacco | last post by:
I'm tinkering around with a data collection system, and have come up with a very hackish way to store my data- for reference, I'm anticipating collecting at least 100 million different dataId...
7
by: CSharper | last post by:
Yesterday I had a heated discussion with my colleagues on what is a data centric application and having business logic in sql. I have group of people who wants to include all the business logic in...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.