example of an asp application that uses host variables

Rich Gugel

example of an asp application that uses host variables
Does anyone have an example of an ASP or .net application that uses host
variables or parameter markers? I've seen hints that Oracle documentation
has a good example of one but have been unable to find it. I'm looking to
get more out of our statement cache, but without a sample the application
folks look lost. Just a small sample going against the sample database or
db2 catalog would be wonderful.

We are Z/OS UDB version 7 with both 7 and 8 db2 connect configurations. If
you have any good links with samples to pass along I'd would not mind
taking a peek at them either.

I recently read the Redbook Squeezing the most out of Dynamic SQL SG24-6418
it's a good summary of dynamic sql caching

TIA

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Don Weigend

Re: example of an asp application that uses host variables
(in response to Rich Gugel)
Here is an example of a .net VB program that uses parameter markers. I
hope this is an example of what you are looking for.



Dim strSQL As String

Dim objConn As ADODB.Connection

Dim objCmd As ADODB.Command

Dim objRS As ADODB.Recordset



strSQL = "SELECT POLICY_EFF_DATE, POLICY_EXP_DATE " & _

"FROM PIF_02_REC " & _

"WHERE POLICY_NUM = ? AND SYM = ? AND MODULE = ? "



Set objConn = New ADODB.Connection

With objConn

.ConnectionString = "file
name=\\wbmdweb01\wbconnectrepository\udl\claims\db2_clm.udl"

.Open

End With



Set objCmd = New ADODB.Command

With objCmd

.ActiveConnection = objConn

.CommandText = strSQL

.CommandType = adCmdText

.Parameters.Append .CreateParameter("@POLICY_NUM", adChar,
adParamInput, 7, "5286083")

.Parameters.Append .CreateParameter("@SYM", adChar, adParamInput, 3,
"HHD")

.Parameters.Append .CreateParameter("@MODULE", adChar, adParamInput,
2, "05")

End With



Set objRS = objCmd.Execute



Set objConn = Nothing

Set objCmd = Nothing

Set objRS = Nothing



Don Weigend

DB2 OS/390 Sysprog

IBM Certified Solutions Expert - DB2 V7 Database Administration OS/390

West Bend Mutual Insurance Company





-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Rich Gugel
Sent: Tuesday, December 09, 2003 2:49 PM
To: [login to unmask email]
Subject: example of an asp application that uses host variables



Does anyone have an example of an ASP or .net application that uses host

variables or parameter markers? I've seen hints that Oracle
documentation

has a good example of one but have been unable to find it. I'm looking
to

get more out of our statement cache, but without a sample the
application

folks look lost. Just a small sample going against the sample database
or

db2 catalog would be wonderful.



We are Z/OS UDB version 7 with both 7 and 8 db2 connect configurations.
If

you have any good links with samples to pass along I'd would not mind

taking a peek at them either.



I recently read the Redbook Squeezing the most out of Dynamic SQL
SG24-6418

it's a good summary of dynamic sql caching



TIA



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Rich Gugel

Re: example of an asp application that uses host variables
(in response to Don Weigend)
Thanks, That was exactly what I was looking for

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm