
October 1st, 2000, 03:12 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Emulating a DSN conection via software to use with metadata tags
<i><b>Originally posted by : Ramon Soler (rsoler@asotransporte.com)</b></i><br />I need to define a dsn connection that works as the defined by system so the code i intend to use uses this definition part of code included it need this conection for the defined Tcccon etc..<br />Normal way througt e:/inetpub/.... does not work in this case code i have used enclosed with comments in the original one ///<br /><br /><!--METADATA TYPE="DesignerControl" startspan<br /><OBJECT classid="clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0" <br />id=DTCRecordset1 style="LEFT: 0px; TOP: 0px" dtcid="8"><br /><PARAM NAME="ExtentX" VALUE="12197"><br /><PARAM NAME="ExtentY" VALUE="2090"><br /><PARAM NAME="State" <br />VALUE="(TCConn=qGalleryq,TCDBObject=qTablesq,TCDBObjectNa me=qBuquesq,TCControlID_Unmatched=qDTCRecordset1q, TCPPConn=qGalleryq,RCDBObject=qRCDBObjectq,TCPPDBO bject=qTablesq,TCPPDBObjectName=qBuquesq,TCCursorT ype=q3s-sStaticq,TCCursorLocation=q3s-sUsesclient-sidescursorsq,TCLockType=q3s-sOptimisticq,TCCacheSize_Unmatched=q10q,TCCommTime out_Unmatched=q10q,CCPrepared=0,CCAllRecords=1,TCN Records_Unmatched=q10q,TCODBCSyntax_Unmatched=qq,T CHTargetPlatform=qq,TCHTargetBrowser_Unmatched=qSe rvers(ASP)q,TCTargetPlatform=qInheritsfromspageq,R CCache=qRCBookPageq,CCOpen=1,GCParameters=(Rows=0) )"><br /><PARAM NAME="RelativePath" VALUE="../"></OBJECT><br />--><br /><!--#INCLUDE FILE="../_ScriptLibrary/Recordset.ASP"--><br /><script language="JavaScript" runat="server"><br />function _initDTCRecordset1()<br />{<br />var dbPath ="e:/inetpub/asotransporte.com/n/2000.mdb";<br /><br />var DBConn = Server.CreateObject('ADODB.Connection');<br />//DBConn.ConnectionTimeout = Application('Gallery_ConnectionTimeout');<br />var ConnectionString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath<br /><br />//DBConn.CommandTimeout = Application('Gallery_CommandTimeout');<br />//DBConn.CursorLocation = Application('Gallery_CursorLocation');<br />DBConn.Open ('ConnectionString');<br />//(Application('Gallery_ConnectionString'),Applicati on('Gallery_RuntimeUserName'), Application('Gallery_RuntimePassword'));<br />var cmdTmp = Server.CreateObject('ADODB.Command');<br />var rsTmp = Server.CreateObject('ADODB.Recordset');<br />cmdTmp.ActiveConnection = DBConn;<br />Thanks in advance<br />Rsoler@asotransporte.com<br /><br />
|