Forums
This topic is locked
View Source Code in Command Object
Posted 07 Sep 2007 01:42:29
1
has voted
07 Sep 2007 01:42:29 Stevan Cohen posted:
I have recently moved from Dreamweaver MX (2003) to CS3. In MX, a recordset object was used to query the database. To troubleshoot a query, <pre id=code><font face=courier size=2 id=code>
Dim SelectedPrimary
Dim SelectedPrimary_numRows
Set SelectedPrimary = Server.CreateObject("ADODB.Recordset"
SelectedPrimary.ActiveConnection = MM_connClusterDB_STRING
SelectedPrimary.Source = "SELECT O.OfficeID, O.ShortOffice FROM tbl_Offices O WHERE OfficeID = '" + Replace(SelectedPrimary__OffID, "'", "''" + "' ORDER BY OfficeName"
SelectedPrimary.CursorType = 0
SelectedPrimary.CursorLocation = 2
SelectedPrimary.LockType = 1
SelectedPrimary.Open()
SelectedPrimary_numRows = 0
</font id=code></pre id=code>
before "SelectedPrimary.Open()" I would add...
Response.Write SelectedPrimary.Source
Response.End()
run the page and copy the code ( <i>SELECT O.OfficeID, O.ShortOffice FROM tbl_Offices O WHERE OfficeID = 7 </i> into Query Analyzer
Is there a similar function to write out the code to a page for troubleshooting a Command Object query that is used in Dreamweaver CS3?
Other than repeatedly filling out the 4 items (Name, Type, Value and Default value) over and over,
how do you make the Command Object to use the same variable, several times in one query?
Dreamweaver CS3 | ASP | SQL SERVER
-- Steve