ok, ya me funciona bien, pero ahora no se porque me manda error en la coneccion...
Microsoft OLE DB Provider for SQL Server
error '80040e4d' Login failed for user 'BIOL'. /bi/users/login.asp, line 9
cuando lo hago asi no me funciona:
Código:
ObjConn.Open = DBOpenConection()
pero cuando le pongo todo el string si:
Código:
conectar = "Provider=sqloledb;" & _
"Data Source=" & strDBPath & ";" & _
"Persist Security Info=False;Trusted_Connection=false;" & _
"Initial Catalog=" & strDBName & ";" & _
"User Id=" & strDBUserId & ";" & _
"Password=" & strDBPassword
.
.
ObjConn.Open conectar
yo en todo el sistema que estoy haciendo lo utilizo como está arriba y me funciona perfectamente... cual es el problema??
esta es la funcion:
Código:
Function DBOpenConection()
Dim Master
Dim strSringConection
strStringConection = "Provider=sqloledb;" & _
"Data Source=" & strDBPath & ";" & _
"Persist Security Info=False;Trusted_Connection=false;" & _
"Initial Catalog=" & strDBName & ";" & _
"User Id=" & strDBUserId & ";" & _
"Password=" & strDBPassword
Set Master = Server.CreateObject("ADODB.Connection")
Master.Open strStringConection
Set DBOpenConection = Master
End Function
me puedes ayudar??
gracias....