Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Transfer Using VBScript

Status
Not open for further replies.

PulsaMatt

IS-IT--Management
Apr 25, 2002
151
US
Hi, I Am looking to try to convert the data that is in a current database into the new structure I designed for Version 3 of the application I am building.

I have been trying to write simple VB scripts to do the conversion for me, but they keep crashing at odd points due to some issues (namely in Version 1 people could use single quotes in a comment field, in version 2 you couldn't but you could use double quotes in a comment field) so both field delimiters that I know of ' and " are out of the question .... any ideas on how I Can do this?

For the most part its a straight old field to new field conversion but there are a couple fields where I need to combine and reorder data to make the new field (The results of me learning this as I go along).

Any help is GREATLY appreciated .

Matt Laski
Sysadmin, Pulsafeeder Inc.
 
I'm trying the replace statement from that link using this line

comments = replace(comments,"'","_",1,1,1)

and I get an ASP error of an invalid use of null in the replace command ... is it due to the ' being the string to replace?

Matt Laski
Sysadmin, Pulsafeeder Inc.
 
I tried running the same thing using:

comments = replace(comments,"t","t",1,1,1)

and I get the same error.

I know comments isnt blank because in the code before that I check for an empty comments field and insert "No Comments Added" in its place ... so thats not it ... *scratches head*

Matt Laski
Sysadmin, Pulsafeeder Inc.
 
How did you &quot;check for an empty comments field&quot;? I'm presuming by If comments <> &quot;&quot; Then....

FYI. NULL <> EMPTY <> &quot;&quot;

Try If IsNull(comments) Then comments = &quot;...&quot;


Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top