or possibly, some NULL values?
in which case, you must have ,NULL, instad of ,'data', in your strSQL...
Main Topics
Browse All TopicsI have the following script that works until the last part of the loop.
the objMSSQLDC1.Execut (strSQL) command stops after the first 23 records.
If I comment out that line and use just Wscript.Echo strSQL I get all 2589 records to show in the output.
Can someone tell me what I am missing?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
like i mentioned, if i comment out the line objMSSQLDC1.Execute (strSQL) it will show all 2500+ rows of data.
and there are null values in the middle of the 23 records that get pulled with the Execute statement, so it isn't NULL that's a problem.
I'm not sure i have the Execute (strSQL) command correct for a loop. I am running a loop to use a split function and update a field, then i want to insert all the data into the new table. I don't know what the exectue command is and i found conn.Execute () on a website but it doesn't appear to be correct.
i was playing with it more and if i move the statment objMSSQLDC1.Execute (strSQL) out of the Loop, it will insert the last record (#2589) into the database, however, when i put inside the loop it will only insert the first 23 records. So the array and SQL statement are doing what its supposed to, so its clearly how i am calling the insert statement, that's where i need help.
where would the null value come from? there are no nulls in the data i am pulling, and i've already put into a log file and on screen display and every record/field has data in it, no nulls. i've even displayed the INSERT statement to very that what is to be inserted contains the right data, when displayed i get 2580 insert statements. but as soon as i put the obj.execute inside the loop it becomes only 23, again no nulls.
i figured it out. after looking at each record in the DB there was a problem with the size of the field for the new database. in tbl1 the size was 11, in tbl2 it was 10 so it was truncating and halting the rest of the query. It also halted if there was an apostrophe in the name, i.e O'Doull, it would give an error and halt.
thanks for the input.
Business Accounts
Answer for Membership
by: angelIIIPosted on 2009-08-10 at 10:46:52ID: 25062176
do you have some values with quotes in the data?
if yes, that could explain..
Select allOpen in new window