1. I have not password because I am using "The Windows account information and so I use to log on to my computer Windows Authentication.
2. I have not a Server. I am working in a notebook as Client.
3. I would need to know as I do for open a SQL database using the following scripts or other.
global.asa
==========
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Session_OnStart ' Runs the first time a user runs any page in your application
'Create an ADO Connection
Set cn = Server.CreateObject("ADODB
.Connectio
n")
' Specify the OLE DB provider.
cn.Provider = "sqloledb"
' Specify connection string on Open method.
' To run the sample, edit this line to reflect your server's name.
ProvStr = "Server=LATITUDE-D62AFE;Da
tabase=Nor
thwind;UID
=sa;"
cn.Open ProvStr
Set Session("cnn") = cn
END Sub
Sub Session_OnEnd ' Runs when a user's session times out or quits your application
'Close the data connection
cn.Close
END Sub
</SCRIPT>
index.asp
=========
<%@ LANGUAGE="VBSCRIPT" %><% 'ON ERROR RESUME NEXT 'Set this so that errors can be handled %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual InterDev 6.0">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>NIMS - Add a Product</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="nimstyle.css">
<!-- #include file="adovbs.inc" -->
</HEAD>
<BODY>
<%
Set cn = Session("cnn")
Set ProductInfo = Server.CreateObject("ADODB
.Recordset
")
querystr = "SELECT * FROM Products"
ProductInfo.ActiveConnecti
on = cn
%>
<TABLE CELLPADDING=5>
<TR>
<% 'Output the Table header row
do while not querystr.EOF
Response.Write "<TD CLASS=header>" & querystr("ProductName") & "</TD>"
querystr.MoveNext
loop
%>
</TR>
</TABLE>
<% 'Close the recordset after use
ProductInfo.Close
%>
</BODY>
</HTML>
Thank you for now.
JanLee
Start Free Trial