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

SQL warnings creating VB error objects.

Status
Not open for further replies.

DavidJA

Programmer
Jan 10, 2002
58
0
0
AU
Hey All,

I've got a n-tier web app, some of my SQL queries are dynamicly generated in VB, and I need to use join hints on some queries (INNER LOOP JOIN).

The problem is that the The join order has been enforced because a local join hint is use message is being returned as a VB error. I want to supress the reporting of this warning, and therefor not return an error at all.


My function that executes the query looks like Set params = ObjCommand.Parameters
params.Append ObjCommand.CreateParameter("@ExecString", 200, adParamInput, 5000)
params("@ExecString") = pSelectClause + " " + pFromClause + " " + pWhereClause + " " + pOrderByClause
Set rs = ObjCommand.Execute
 
I have never used params in ADO, first of all its too much code....


how about this...

set sqlrs = sqlcnn.execute(myconcatenated_sqlstring)

where sqlrs is the recordset
and sqlcnn is the connection
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top