I'm new to ASP and am trying to learn about conn strings. I use Brinkster basic.
I have a third party News Manager that I want to use to post articles to a web page. It's an ASP app with it's own DB. Brinkster requires a DSNless connection.
The code in the app to declare variables and strings is basically this:
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection"
Set objRS = Server.CreateObject("ADODB.Recordset"
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data_ Source=\BrinksterUserName\db\DBName.mdb;" & "Persist_ Security Info=False"
' Open News table in database
objRS.Open "News", objConn, adOpenStatic, adLockReadOnly,_ adCmdTable
' Move to the last record
objRS.MoveLast
**Using this code, the browser starts looking for a DB on C:\ and errors out.
So I changed the conn code to this:
objConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security Info=False;Data Source=" & Server.MapPath("/BrinksterUserName/db/DBName.mdb"
from
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data_ Source=\BrinksterUserName\db\DBName.mdb;" & "Persist_ Security Info=False"
I think that changes the conn string to a DSNless connection but I still can't post to the DB. Browser returns error: HTTP 500 - Internal server error
Do I have to alter the recordset some how? Other? Help please. Thanks in advance.
I have a third party News Manager that I want to use to post articles to a web page. It's an ASP app with it's own DB. Brinkster requires a DSNless connection.
The code in the app to declare variables and strings is basically this:
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection"
Set objRS = Server.CreateObject("ADODB.Recordset"
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data_ Source=\BrinksterUserName\db\DBName.mdb;" & "Persist_ Security Info=False"
' Open News table in database
objRS.Open "News", objConn, adOpenStatic, adLockReadOnly,_ adCmdTable
' Move to the last record
objRS.MoveLast
**Using this code, the browser starts looking for a DB on C:\ and errors out.
So I changed the conn code to this:
objConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security Info=False;Data Source=" & Server.MapPath("/BrinksterUserName/db/DBName.mdb"
from
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data_ Source=\BrinksterUserName\db\DBName.mdb;" & "Persist_ Security Info=False"
I think that changes the conn string to a DSNless connection but I still can't post to the DB. Browser returns error: HTTP 500 - Internal server error
Do I have to alter the recordset some how? Other? Help please. Thanks in advance.