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

How can I identify DSN?

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
US
Greetings!

I write CFML and have just acquired an account who's web site was written in ASP.

I have DWUD and figured and can use it to maintain this site. I received a CD with all files. I installed files under a subdirectory of a working site (FLASH) for me to play with and get my feet wet.

These are my questions:

CFML uses a template that executes everytime a template is loaded (application.cfm), is there an equivalent in ASP?

How can I identify where a DSN is opened (what is the syntax)?

Does ASP use application and/or session variables?

Can I use DWUD or should I go straight into ASP using editor?


Thank you all in advance for your time!

Regards;


josel
KNOWLEDGE: Something you can give away enlessly and gain more of it in the process! - Jose Lerebours
 
K, let's see what I can tell you.

1. Besides the Global.asa for ASP pages, I don't think anything else is loaded for each page. Not sure if that helps, or is even right, need a second opinion.

2. For a database connection, check the top of the page. If created with DWUD then the code resembles....

<%
set Recordset1 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
...
...
...
%>

Connection strings are stored in separate files in DWUD. Try the connections folder for more info.

3. Yes and yes.

4. Dreamweaver UltraDev is great to use if you have limited experience with ASP. Most things can be done with the click of a button and if you pay attention, soon enough, you can do it by hand. Ryan
rmindorff@hotmail.com
 
There is a 'connections' directory and a file within. This is the content

<%
' FileName=&quot;Connection_odbc_conn_dsn.htm&quot;
' Type=&quot;ADO&quot;
' HTTP=&quot;false&quot;
' Catalog=&quot;&quot;
' Schema=&quot;&quot;
MM_Blinds_STRING = &quot;dsn=Starblinds;&quot;
%>

I created an ODBC DSN (using control panels) and I am getting following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/stardecorating/Main/step2.asp, line 294


This is the snipet of code where error occurs:

<%
set rsStyle = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rsStyle.ActiveConnection = MM_Blinds_STRING
rsStyle.Source = &quot;SELECT * FROM Styles WHERE PriceTable = '&quot; + Replace(rsStyle__MMColParam, &quot;'&quot;, &quot;''&quot;) + &quot;' AND StyleId= '&quot; + Replace(rsStyle__Productid, &quot;'&quot;, &quot;''&quot;) + &quot;'&quot;
rsStyle.CursorType = 0
rsStyle.CursorLocation = 2
rsStyle.LockType = 3
rsStyle.Open()
rsStyle_numRows = 0

shadeorblind=(rsStyle.Fields.Item(&quot;Shadeorblind&quot;).Value)
if shadeorblind=&quot;B&quot; then
sorb=&quot;Blinds&quot;
else
sorb=&quot;Shades&quot;
end if

%>

What am I looking for? Should I set the DSN within DWUD, and if so, how?

Thanks;


Jose Lerebours

KNOWLEDGE: Something you can give away enlessly and gain more of it in the process! - Jose Lerebours
 
Jose,

I am probably stating the obvious, but did you set up the DSN on the Server as well?

:)

Jayuk
 
Actually, since I intended to access and modify these files from remote site, I am working on it within server itself.

I created the DSN using MS Control Panel, ODBC Drivers, ...

Regards;


josel
KNOWLEDGE: Something you can give away enlessly and gain more of it in the process! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top