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

How to pass parameters in MS Access? 1

Status
Not open for further replies.

mnongkhlaw

Programmer
Feb 22, 2002
62
IN
Dear folks,

I have an ASP page, trans.asp, in my Visual Interdev project . SOM is enabled for this page as I'm using Recordset and Grid DTCs
My Recordset DTC is named rsTrans and my Grid DTC is named grdTrans. Relevant properties of these 2 objects are given below:

1. rsTrans-Properties-General tab-SQL Statement :
select distinct veh_type from zone order by veh_type

Here zone is a table in a MS Access mdb file. The connection object is named cnnElect using OLEDB data provider

2. grdTrans-Properties-Data tab-Grid Columns-Field/Expression :
=&quot;<A HREF=transchoice.asp?veh_type=&quot;+[veh_type]+&quot;>&quot;+[veh_type]+&quot;</A>&quot;

where veh_type is a field in zone table having text values like BUS,MINI-BUS,JEEP

This page displays correctly.

Now, my other page referenced above, transchoice.asp, also has SOM enabled with one Recordset DTC named rsTransChoice and another grid DTC named grdTransChoice. Relevant properties of these 2 objects are given below:

1. rsTransChoice-Properties-General tab-Database Object=DE Commands and Object Name=cmdTest
rsTransChoice-Properties-Implementation tab-Automatically open the recordset is DISABLED

2. grdTransChoice-Properties-Data tab-Grid Columns-Field/Expression :
=&quot;<A HREF=transdetails.asp?veh_type1=&quot;+[veh_type1]+&quot;>&quot;+[veh_type1]+&quot;</A>&quot;

where veh_type1 is a field in zone table having text values like B-1,B-2,..,B-x, MB-1,MB-2,..,MB-x,J-1,J-2,...,J-x etc

My Command object (cmdTest) properties :

General tab-SQL Statement :
SELECT distinct veh_type1 from zone where trim(veh_type)=?

Parameters tab :
Parameters=Param1
Parameter Properties : Name=Param1, Direction=Input,DataType=adVarChar,Size=12,Host data type=String(VT_BSTR),Required=True

In transchoice.asp, I added a subroutine for grabbing the parameter required for the rsTransChoice recordset object as follows :-

Sub rsTransChoice_onbeforeopen()
dim svar
'Grab the veh_type send by trans.asp
svar=trim(Request.QueryString(&quot;veh_type&quot;))
'Fix it just in case it cannot grab
if len(trim(svar))=0 then
svar=&quot;BUS&quot;
end if
rsTransChoice.setParameter 0,svar
rsTransChoice.open
End Sub


When I view the trans.asp page and click on the grdTrans hyperlinked column names which appear like BUS,JEEP,TRUCK etc.
(hovering the mouse pointer over them, they appear like in status bar of browser),
the page then takes me to transchoice.asp, but alas! I get a blank page with no errors and no grdTransChoice where I can again click to
take me to transdetails.asp!

I apologise for my long post, but I hope that it will help someone to help me out.

Mark Nongkhlaw
mark@shillong.meg.nic.in
 
Try turning on the trace feature of the SOM - look at the top of the page. Check that the recordset is being opened (ie it either has auto-open as part of the recordsetDTC, or you have added code to explicitly open the recordset.)

My preference in these cases is to supply the parameter in the page open event. Add a PageObjectDTC, then use the scriptOutline to add a thisPage_onenter subroutine...
(Note, always string an empty string to the QueryString() and similar functions - that way you do not get null values to confuse things)

Sub thisPage_onenter()

if thisPage.firstEntered = true then
OpenTransChoice
end if

End Sub

Sub OpenTransChoice()
dim svar
'Grab the veh_type send by trans.asp
svar=trim(Request.QueryString(&quot;veh_type&quot;) & &quot;&quot;)
'Fix it just in case it cannot grab
if len(trim(svar))=0 then
svar=&quot;BUS&quot;
end if
rsTransChoice.setParameter 0,svar
rsTransChoice.open
End Sub

 
Thanks, MerlinB, you've been such a great help. See the practical implementation of your advice on and click on the Transport Information link. As you can see, the Vehicle Nos. are not sorted. I tried adding 'order by' after the ? mark in the command object's SQL string, but that didn't work.

Thanks again,

Mark.
 
Sorry, MerlinB, I spoke too fast! While trans.asp is running OK in my production server (164.100.150.132/elect2003), transchoice.asp produced :-

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)

Error Type:
(0x80020009)
Exception occurred.
/elect2003/transchoice.asp, line 120


Browser Type:
Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 95; T312461)

Page:
GET /elect2003/transchoice.asp

It was running OK in PWS.

Here are the server variables of my production server:
ALL_HTTP: HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */* HTTP_ACCEPT_LANGUAGE:en-gb,de;q=0.5 HTTP_CONNECTION:Keep-Alive HTTP_HOST:164.100.150.132 HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 95; T312461) HTTP_COOKIE:ASPSESSIONIDGGQGGNFC=EJEDJMKBLFPNDMOMODHLJGIL HTTP_VIA:1.0 dcshil HTTP_ACCEPT_ENCODING:gzip, deflate
ALL_RAW: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */* Accept-Language: en-gb,de;q=0.5 Connection: Keep-Alive Host: 164.100.150.132 User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 95; T312461) Cookie: ASPSESSIONIDGGQGGNFC=EJEDJMKBLFPNDMOMODHLJGIL Via: 1.0 dcshil Accept-Encoding: gzip, deflate
APPL_MD_PATH: /LM/W3SVC/1/Root/elect2003
APPL_PHYSICAL_PATH: g:\inetpub\AUTH_TYPE:
AUTH_USER:
CERT_COOKIE:
CERT_FLAGS:
CERT_ISSUER:
CERT_KEYSIZE:
CERT_SECRETKEYSIZE:
CERT_SERIALNUMBER:
CERT_SERVER_ISSUER:
CERT_SERVER_SUBJECT:
CERT_SUBJECT:
CONTENT_LENGTH: 0
CONTENT_TYPE:
GATEWAY_INTERFACE: CGI/1.1
HTTPS: off
HTTPS_KEYSIZE:
HTTPS_SECRETKEYSIZE:
HTTPS_SERVER_ISSUER:
HTTPS_SERVER_SUBJECT:
INSTANCE_ID: 1
INSTANCE_META_PATH: /LM/W3SVC/1
LOCAL_ADDR: 164.100.150.132
LOGON_USER:
PATH_INFO: /elect2003/listallservervars.asp
PATH_TRANSLATED: g:\inetpub\QUERY_STRING:
REMOTE_ADDR: 164.100.209.34
REMOTE_HOST: 164.100.209.34
REMOTE_USER:
REQUEST_METHOD: GET
SCRIPT_NAME: /elect2003/listallservervars.asp
SERVER_NAME: 164.100.150.132
SERVER_PORT: 80
SERVER_PORT_SECURE: 0
SERVER_PROTOCOL: HTTP/1.0
SERVER_SOFTWARE: Microsoft-IIS/5.0
URL: /elect2003/listallservervars.asp
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
HTTP_ACCEPT_LANGUAGE: en-gb,de;q=0.5
HTTP_CONNECTION: Keep-Alive
HTTP_HOST: 164.100.150.132
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 95; T312461)
HTTP_COOKIE: ASPSESSIONIDGGQGGNFC=EJEDJMKBLFPNDMOMODHLJGIL
HTTP_VIA: 1.0 dcshil
HTTP_ACCEPT_ENCODING: gzip, deflate


What might be the problem?


Any and all help will be appreciated.

Mark Nongkhlaw
(mark@shillong.meg.nic.in)
 
Well, what is on

elect2003/transchoice.asp, line 120

? That is usually a good place to start looking!

Make sure the Server has read/write access to the directory containing the Access database (with respect to the IUSR_machinename user id).
 
MerlinB,

Been eagerly awaiting your reply. Its working OK in PWS4.

I'm listing the text version of transchoice.asp

Please do not mind the long listing :-

Code:
<%@ Language=VBScript %>
<SCRIPT id=DebugDirectives runat=server language=javascript>
// Set these to true to enable debugging or tracing
@set @debug=false
@set @trace=false
</SCRIPT>
<% ' VI 6.0 Scripting Object Model Enabled %>
<!--#include file=&quot;_ScriptLibrary/pm.asp&quot;-->
<% if StartPageProcessing() Then Response.End() %>
<FORM name=thisForm METHOD=post>
<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<TITLE>Vehicle Number Query</TITLE>
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>

'Sub thisPage_onenter()
 'if thisPage.firstEntered = true then
 'OpenTransChoice
 'end if
'End Sub
'Sub OpenTransChoice()
'dim svar
'Grab the veh_type sent by trans.asp
'svar=trim(Request.QueryString(&quot;veh_type&quot;) & &quot;&quot;)
'Fix it just in case it cannot grab
'if len(trim(svar))=0 then
'svar=&quot;BUS&quot;
'end if
'rsTransChoice.setParameter 0,svar
'rsTransChoice.open
'End Sub
Sub rsTransChoice_onbeforeopen()
dim svar
'Grab the veh_type send by trans.asp
svar=trim(Request.QueryString(&quot;veh_type&quot;))
'Fix it just in case it cannot grab
if len(trim(svar))=0 then
 svar=&quot;BUS&quot;
end if
rsTransChoice.setParameter 0,svar
rsTransChoice.open
End Sub

</SCRIPT>
</HEAD>
<BODY bgColor=LightSeaGreen><FONT color=darkred><STRONG>Click on your Vehicle Number below to 
reveal the details...</STRONG>      
          </FONT>

<P>
<!--METADATA TYPE=&quot;DesignerControl&quot; startspan
<OBJECT id=PageObject1 style=&quot;LEFT: 0px; TOP: 0px&quot; classid=&quot;clsid:8CC35CD6-E98B-11D0-B218-00A0C92764F5&quot;>
	<PARAM NAME=&quot;ExtentX&quot; VALUE=&quot;4233&quot;>
	<PARAM NAME=&quot;ExtentY&quot; VALUE=&quot;1508&quot;>
	<PARAM NAME=&quot;State&quot; VALUE=&quot;(ObjectName_Unmatched=\qtranschoice\q,NavigateMethods=(Rows=0),ExecuteMethods=(Rows=0),Properties=(Rows=0),References=(Rows=0))&quot;></OBJECT>
-->
<SCRIPT LANGUAGE=JavaScript RUNAT=SERVER>
/* VIPM PAGE DESCRIPTION
<DSC NAME=&quot;transchoice&quot;>
   <OBJECT NAME=&quot;navigate&quot;>
      <METHOD NAME=&quot;show&quot; SCENARIOS=&quot;CLIENT,SERVER&quot;/>
   </OBJECT>
</DSC>
VIPM PAGE DESCRIPTION */
</SCRIPT>
<%
Sub [_PO_OutputClientCode]()
%>
<SCRIPT LANGUAGE=JavaScript>
if (typeof transchoice_onbeforeserverevent == 'function' || typeof transchoice_onbeforeserverevent == 'unknown')
	thisPage.advise('onbeforeserverevent', 'transchoice_onbeforeserverevent()');

transchoice = thisPage;
transchoice.location = &quot;transchoice.asp&quot;;
transchoice.navigate = new Object;
transchoice.navigate.show = Function('thisPage.invokeMethod(&quot;&quot;, &quot;show&quot;, this.show.arguments);');
</SCRIPT>
<%
End Sub
%>

<SCRIPT LANGUAGE=JavaScript RUNAT=SERVER>
function _PO_getClientAccessor(serverValue)
{
	if (serverValue == null)
		return 'null';
	return 'unescape(&quot;' + escape(serverValue) + '&quot;)';
}

function _PO_ctor()
{
	thisPage.getClientAccessor = _PO_getClientAccessor;

transchoice = thisPage;
transchoice.location = &quot;transchoice.asp&quot;;
transchoice.navigate = new Object;
transchoice.navigate.show = Function('return;');

	thisPage._objEventManager.adviseDefaultHandler('transchoice','onenter');
	thisPage._objEventManager.adviseDefaultHandler('transchoice','onexit');
	thisPage._objEventManager.adviseDefaultHandler('transchoice','onshow');
	thisPage.registerVTable(thisPage.navigate, PAGE_NAVIGATE);
}

function _PO_dtor()
{
if (thisPage._redirect == '')
	_PO_OutputClientCode();
}

</SCRIPT>


<!--METADATA TYPE=&quot;DesignerControl&quot; endspan-->
<!--METADATA TYPE=&quot;DesignerControl&quot; startspan
<OBJECT id=rsTransChoice style=&quot;LEFT: 0px; TOP: 0px&quot; classid=&quot;clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0&quot;>
	<PARAM NAME=&quot;ExtentX&quot; VALUE=&quot;12197&quot;>
	<PARAM NAME=&quot;ExtentY&quot; VALUE=&quot;2090&quot;>
	<PARAM NAME=&quot;State&quot; VALUE=&quot;(TCConn=\qcnnElect\q,TCDBObject=\qDE\sCommands\q,TCDBObjectName=\qcmdTrans\q,TCControlID_Unmatched=\qrsTransChoice\q,TCPPConn=\qcnnElect\q,RCDBObject=\qRCDBObject\q,TCPPDBObject=\qDE\sCommands\q,TCPPDBObjectName=\qcmdTrans\q,TCSQLStatement_Unmatched=\qSELECT\sdistinct\sveh_type1\sfrom\szone\swhere\strim(veh_type)=?\q,TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q100\q,TCCommTimeout_Unmatched=\q30\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=1,GCParameters=(Rows=1,Row1=(CType_Unmatched=\qIn\q,CParName_Unmatched=\qParam1\q,CDataType_Unmatched=\qVarChar\q,CSize_Unmatched=\q12\q,CReq=1)))&quot;></OBJECT>
-->
<!--#INCLUDE FILE=&quot;_ScriptLibrary/Recordset.ASP&quot;-->
<SCRIPT LANGUAGE=&quot;JavaScript&quot; RUNAT=&quot;server&quot;>
function _setParametersrsTransChoice()
{
}
function _initrsTransChoice()
{
	rsTransChoice.advise(RS_ONBEFOREOPEN, _setParametersrsTransChoice);
	thisPage.createDE();
	var rsTmp = DE.Recordsets('cmdTrans');
	rsTransChoice.setRecordSource(rsTmp);
	rsTransChoice.open();
	if (thisPage.getState('pb_rsTransChoice') != null)
		rsTransChoice.setBookmark(thisPage.getState('pb_rsTransChoice'));
}
function _rsTransChoice_ctor()
{
	CreateRecordset('rsTransChoice', _initrsTransChoice, null);
}
function _rsTransChoice_dtor()
{
	rsTransChoice._preserveState();
	thisPage.setState('pb_rsTransChoice', rsTransChoice.getBookmark());
}
</SCRIPT>

<!--METADATA TYPE=&quot;DesignerControl&quot; endspan-->
<!--METADATA TYPE=&quot;DesignerControl&quot; startspan
<OBJECT id=grdTransChoice style=&quot;LEFT: 0px; WIDTH: 460px; TOP: 0px; HEIGHT: 147px&quot; 
	classid=clsid:277FC3F2-E90F-11D0-B767-0000F81E081D width=460 height=147>
	<PARAM NAME=&quot;_ExtentX&quot; VALUE=&quot;12171&quot;>
	<PARAM NAME=&quot;_ExtentY&quot; VALUE=&quot;3889&quot;>
	<PARAM NAME=&quot;DataConnection&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;SourceType&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;Recordset&quot; VALUE=&quot;rsTransChoice&quot;>
	<PARAM NAME=&quot;CtrlName&quot; VALUE=&quot;grdTransChoice&quot;>
	<PARAM NAME=&quot;UseAdvancedOnly&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;AdvAddToStyles&quot; VALUE=&quot;-1&quot;>
	<PARAM NAME=&quot;AdvTableTag&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;AdvHeaderRowTag&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;AdvHeaderCellTag&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;AdvDetailRowTag&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;AdvDetailCellTag&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;ScriptLanguage&quot; VALUE=&quot;1&quot;>
	<PARAM NAME=&quot;ScriptingPlatform&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;EnableRowNav&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;HiliteColor&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;RecNavBarHasNextButton&quot; VALUE=&quot;-1&quot;>
	<PARAM NAME=&quot;RecNavBarHasPrevButton&quot; VALUE=&quot;-1&quot;>
	<PARAM NAME=&quot;RecNavBarNextText&quot; VALUE=&quot;   >   &quot;>
	<PARAM NAME=&quot;RecNavBarPrevText&quot; VALUE=&quot;   <   &quot;>
	<PARAM NAME=&quot;ColumnsNames&quot; VALUE='&quot;=&quot;&quot;<A HREF=transdetails.asp?veh_type1=&quot;&quot;+[veh_type1]+&quot;&quot;>&quot;&quot;+[veh_type1]+&quot;&quot;</A>&quot;&quot;&quot;'>
	<PARAM NAME=&quot;columnIndex&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;displayWidth&quot; VALUE=&quot;68&quot;>
	<PARAM NAME=&quot;Coltype&quot; VALUE=&quot;1&quot;>
	<PARAM NAME=&quot;formated&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;DisplayName&quot; VALUE='&quot;VEHICLE NUMBER&quot;'>
	<PARAM NAME=&quot;DetailAlignment&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;HeaderAlignment&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;DetailBackColor&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;HeaderBackColor&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;HeaderFont&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;HeaderFontColor&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;HeaderFontSize&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;HeaderFontStyle&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;DetailFont&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;DetailFontColor&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;DetailFontSize&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;DetailFontStyle&quot; VALUE=&quot;&quot;>
	<PARAM NAME=&quot;ColumnCount&quot; VALUE=&quot;1&quot;>
	<PARAM NAME=&quot;CurStyle&quot; VALUE=&quot;Basic Navy&quot;>
	<PARAM NAME=&quot;TitleFont&quot; VALUE=&quot;Arial&quot;>
	<PARAM NAME=&quot;titleFontSize&quot; VALUE=&quot;4&quot;>
	<PARAM NAME=&quot;TitleFontColor&quot; VALUE=&quot;16777215&quot;>
	<PARAM NAME=&quot;TitleBackColor&quot; VALUE=&quot;13416&quot;>
	<PARAM NAME=&quot;TitleFontStyle&quot; VALUE=&quot;1&quot;>
	<PARAM NAME=&quot;TitleAlignment&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;RowFont&quot; VALUE=&quot;Arial&quot;>
	<PARAM NAME=&quot;RowFontColor&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;RowFontStyle&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;RowFontSize&quot; VALUE=&quot;2&quot;>
	<PARAM NAME=&quot;RowBackColor&quot; VALUE=&quot;16777215&quot;>
	<PARAM NAME=&quot;RowAlignment&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;HighlightColor3D&quot; VALUE=&quot;268435455&quot;>
	<PARAM NAME=&quot;ShadowColor3D&quot; VALUE=&quot;268435455&quot;>
	<PARAM NAME=&quot;PageSize&quot; VALUE=&quot;10&quot;>
	<PARAM NAME=&quot;MoveFirstCaption&quot; VALUE=&quot;    |<    First&quot;>
	<PARAM NAME=&quot;MoveLastCaption&quot; VALUE=&quot;    >|    Last&quot;>
	<PARAM NAME=&quot;MovePrevCaption&quot; VALUE=&quot;    <<   Previous&quot;>
	<PARAM NAME=&quot;MoveNextCaption&quot; VALUE=&quot;    >>   Next&quot;>
	<PARAM NAME=&quot;BorderSize&quot; VALUE=&quot;1&quot;>
	<PARAM NAME=&quot;BorderColor&quot; VALUE=&quot;13421772&quot;>
	<PARAM NAME=&quot;GridBackColor&quot; VALUE=&quot;8421504&quot;>
	<PARAM NAME=&quot;AltRowBckgnd&quot; VALUE=&quot;12632256&quot;>
	<PARAM NAME=&quot;CellSpacing&quot; VALUE=&quot;0&quot;>
	<PARAM NAME=&quot;WidthSelectionMode&quot; VALUE=&quot;2&quot;>
	<PARAM NAME=&quot;GridWidth&quot; VALUE=&quot;100&quot;>
	<PARAM NAME=&quot;EnablePaging&quot; VALUE=&quot;-1&quot;>
	<PARAM NAME=&quot;ShowStatus&quot; VALUE=&quot;-1&quot;>
	<PARAM NAME=&quot;StyleValue&quot; VALUE=&quot;453613&quot;>
	<PARAM NAME=&quot;LocalPath&quot; VALUE=&quot;&quot;></OBJECT>
-->
<!--#INCLUDE FILE=&quot;_ScriptLibrary/Button.ASP&quot;-->
<!--#INCLUDE FILE=&quot;_ScriptLibrary/RSNavBar.ASP&quot;-->
<!--#INCLUDE FILE=&quot;_ScriptLibrary/DataGrid.ASP&quot;-->
<SCRIPT LANGUAGE=JavaScript RUNAT=Server>
function _initgrdTransChoice()
{
grdTransChoice.pageSize = 10;
grdTransChoice.setDataSource(rsTransChoice);
grdTransChoice.tableAttributes = ' cellpadding=2  cellspacing=0 bordercolor=#cccccc bgcolor=Gray border=1 cols=1 rules=ALL WIDTH=100%';
grdTransChoice.headerAttributes = '   bgcolor=#003468 align=Left';
grdTransChoice.headerWidth[0] = ' WIDTH=14%';
grdTransChoice.headerFormat = '<Font face=&quot;Arial&quot; size=4 color=White> <b>';
grdTransChoice.colHeader[0] = '\'VEHICLE NUMBER\'';
grdTransChoice.rowAttributes[0] = '  bgcolor = White align=Left bordercolor=#cccccc';
grdTransChoice.rowAttributes[1] = '  bgcolor = Silver align=Left bordercolor=#cccccc';
grdTransChoice.rowFormat[0] = ' <Font face=&quot;Arial&quot; size=2 color=Black >';
grdTransChoice.colAttributes[0] = '  WIDTH=14%';
grdTransChoice.colFormat[0] = '<Font Size=2 Face=&quot;Arial&quot; Color=Black >';
grdTransChoice.colData[0] = '&quot;<A HREF=transdetails.asp?veh_type1=&quot;+rsTransChoice.fields.getValue(\'veh_type1\')+&quot;>&quot;+rsTransChoice.fields.getValue(\'veh_type1\')+&quot;</A>&quot;';
grdTransChoice.navbarAlignment = 'Right';
var objPageNavbar = grdTransChoice.showPageNavbar(170,1);
objPageNavbar.getButton(0).value = '    |<    First';
objPageNavbar.getButton(1).value = '    <<   Previous';
objPageNavbar.getButton(2).value = '    >>   Next';
objPageNavbar.getButton(3).value = '    >|    Last';
grdTransChoice.hasPageNumber = true;
}
function _grdTransChoice_ctor()
{
	CreateDataGrid('grdTransChoice',_initgrdTransChoice);
}
</SCRIPT>

<%	grdTransChoice.display %>


<!--METADATA TYPE=&quot;DesignerControl&quot; endspan-->
</P>
</BODY>
<% ' VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
</HTML>

I hope this will help you help me out.

Mark.
 
Do other ASP Pages that use DTC's work?

If not, have you installed the VisualInterdev Server components on the server? (Disk 2 of the enterprise Vis Sudio distribution)

If so, then did you copy the DataEnvironment.asa file found in _private subdirectory to the live server?

Make sure the Access database connection string is not dependant on its location - ie use an ODBC DSN or file DSN so that you can configure these separately on each server without needing to edit your web code / global.asa.
 
>Do other ASP Pages that use DTC's work?
Yes, you can see the other links working on
They mostly use DTCs

>[snip]have you installed the VisualInterdev Server components on the server? (Disk 2 of the enterprise Vis Sudio distribution)

I'll have to find that out from Web Admin.
However, I'd like to know whether the other links
would work without this?

>If so, then did you copy the DataEnvironment.asa file found in _private subdirectory to the live server?

Couldn't connect to server today.
Will check that out ASAP and update you.

>Make sure the Access database connection string is not dependant on its location - ie use an ODBC DSN or file DSN so that you can configure these separately on each server without needing to edit your web code / global.asa.

Well, I'm using an OLEDB connection string in global.asa
as according to what I've learnt, ODBC connections
are not thread-safe.

Mark.
 
MerlinB,

Yes VI Server components have been installed.
Yes, DataEnvironment.asa has been copied.

What else might be wrong?

Mark.
 
I really don't know. Try msdn knowledgebase article 311766.

If you want to know what is on line 120, in interdev just right click the DTC that is 'hiding' that line and then click 'show hidden text' (or whatever). Then the appropriate line shows up. I cannot guess this from your code dump.

Try turning on the trace facility. This sometimes uncovers the nature of the error. I have adjusted the DTC javascript (server-side) code to output additional trace messages - when parameters are set etc. You may want to do this to home in on the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top