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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

varChar Parameter Help

Status
Not open for further replies.

aco636

IS-IT--Management
Nov 25, 2003
212
GB
Hi All
As always, any help gratefully received.

I am writing a vbScript to insert jobs in to a jobs table.
For the most part, the valuse to be entered are static.
However, as you would expect I have a few variables I need to change with each insert.

I have never worked out how to set the value of a pareter for a memo type. I have a text file I read in to a variable (contains instructions for the job on multiple lines)

I cant work out how to set this into a parameter.

Ideally, I would like to name it @Serviceremarks and insert it like so;
strRemark = read content of file. I have no problem here.

strSQL = "INSERT INTO Jobs(SiteID, CustomerNo, JobDate, ServiceRemarks, EnteredBy)
VALUES(@SiteID, 'ABC123', CURDATE(), @ServiceRemarks, 'ACO')"

Set param = cmd.CreateParameter
param.Append Cmd.CreateParameter("@ServiceRemarks",adMemo,adParamInput)

All gets hazey here setting value

cmd.CommandText = strSQL
Regards ACO
 
Sorry wrong forum, will post in vbScript.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top