jennypretty
IS-IT--Management
Hello friends,
I created an odbc datasourcse 'JennyDSN' to connect to sql server db and it was sucessful. When I open an asp file, it showed this error:
odbc sql server driver login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
This line: dbConn.open generate error.
I stored a datasource in global.asa file and here it is:
<!--==Visual InterDev Generated - startspan==-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft Excel 10.0 Object Library" UUID="{00020813-0000-0000-C000-000000000046}" VERSION="1.4"-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5 Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft Scripting Runtime" UUID="{420B2830-E718-11CF-893D-00A0C9054228}" VERSION="1.0"-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft Office XP Web Components" UUID="{0002E550-0000-0000-C000-000000000046}" VERSION="1.0"-->
<!--==Visual InterDev Generated - endspan==-->
<OBJECT RUNAT=server SCOPE=Session PROGID=ADODB.Connection id=dbConn></OBJECT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart()
dbConn.ConnectionString = "DSN=JennyDSN;"
End Sub
Sub Session_OnEnd()
dbConn.Close()
End Sub
</SCRIPT>
I created an odbc datasourcse 'JennyDSN' to connect to sql server db and it was sucessful. When I open an asp file, it showed this error:
odbc sql server driver login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
This line: dbConn.open generate error.
I stored a datasource in global.asa file and here it is:
<!--==Visual InterDev Generated - startspan==-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft Excel 10.0 Object Library" UUID="{00020813-0000-0000-C000-000000000046}" VERSION="1.4"-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5 Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft Scripting Runtime" UUID="{420B2830-E718-11CF-893D-00A0C9054228}" VERSION="1.0"-->
<!--METADATA TYPE="TypeLib" NAME="Microsoft Office XP Web Components" UUID="{0002E550-0000-0000-C000-000000000046}" VERSION="1.0"-->
<!--==Visual InterDev Generated - endspan==-->
<OBJECT RUNAT=server SCOPE=Session PROGID=ADODB.Connection id=dbConn></OBJECT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart()
dbConn.ConnectionString = "DSN=JennyDSN;"
End Sub
Sub Session_OnEnd()
dbConn.Close()
End Sub
</SCRIPT>