Hi Dear JIM.H,
This is the sample where you give all your connection string values inside
the asp.net file (ie. for example: in code behind)
But in your case You have to give
either
"DSN=mySystemDSN;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
or
"FILEDSN=c:\somepath\mydb.dsn;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
in you web.config in <appSettings></appSettings> section like below
<configuration>
<appSettings>
<add key="pubsDSN" value="DSN=mySystemDSN;Uid=myUsername;Pwd=myPassword"
/>
</appSettings>
</configuration>
OR
<configuration>
<appSettings>
<add key="pubsFileDSN"
value="FILEDSN=c:\somepath\mydb.dsn;Uid=myUsername;Pwd=myPassword"/>
</appSettings>
</configuration>
and
in your code behind to access the web.config file DSN/FileDSN
Dim dsn As String = ConfigurationSettings.AppSettings("pubsDSN")
or
Dim dsn As String = ConfigurationSettings.AppSettings("pubsFileDSN")
ODBC DSN
=======
Using an ODBC DSN (Data Source Name) is a two step process.
1) You must first create the DSN via the "ODBC Data Source Administrator"
program found in your computer's Control Panel (or Administrative Tools menu
in Windows 2000). Make sure to create a SYSTEM DSN (not a USER DSN) when
using ASP(I think same thing holds good for ASP.NET).
2) Then use the following connection string - with your own DSN
name of course.
DSN
====
oConn.Open "DSN=mySystemDSN;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
File DSN
======
oConn.Open "FILEDSN=c:\somepath\mydb.dsn;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
Note:
====
The problem with DSN is that Users can (and will) modify or delete them by
mistake, then your program won't work so well. So it's better to use a
DSN-Less or OLE DB Provider connection string - with a Trusted Connection if
possible!
About ODBC data sources
================
http://msdn.microsoft.com/library/d...us/off2000/html/acconAboutODBCDataSources.asp
Login System (ASP.NET)
================
http://www.codeproject.com/Purgatory/Login_System.asp
For Anything & Everything, Please Let Me Know
Bye
Venkat_KL