Connection Errors

Results 1 to 3 of 3

Thread: Connection Errors

  1. #1
    Rodger Campbell Guest

    Default Connection Errors

    I&#039m a newbie to ASP&#039s. Am trying to connect to an Oracle Dbse. I keep getting an error from the Script Debugger saying it doesn&#039t recognise various ASP objects.<BR> eg, Error: Object required: Server<BR> Error: Object required: Response<BR><BR>What am I doing wrong!! I&#039ve spent a week over this problem. Here are some code samples:<BR><BR>&#060;Script Language="VBScript"&#062;<BR>&#060;!--<BR> Dim objConn, objRS, stSQL, strDSN<BR> strDSN = "dsn=LISDSN;uid=genadmin;pwd=good2bb;"<BR><BR>&#03 9establishes a connectoion with data source<BR> Set objConn = Server.CreateObject("ADODB.Connection") &#039Error "Object required: Server"<BR> objConn.Open strDSN<BR><BR>&#039instantiates a Recordset object<BR> Set objRS=Server.CreateObject("ADODB.RecordSet")<BR><B R>Here I tried to connect to an Access Database:<BR><BR>&#060;Script Language="VBScript"&#062;<BR>&#060;!--<BR> Dim strconn, conn<BR><BR>strconn = "DRIVER=Microsoft Access Driver (Nwind.mdb);DBQ=" & Server.MapPath("C:Program FilesMicrosoft Visual StudioVB98Nwind.mdb") <BR>set conn = server.createobject("adodb.connection") &#039Error here conn.open strconn <BR><BR> Set objRS=Server.CreateObject("ADODB.RecordSet")<BR><B R>Hope you can help,<BR>regards Rodger.<BR>

  2. #2
    Mark Wilson Guest

    Default RE: Connection Errors

    It looks like you are putting the ASP scripts into Client side blocks. They must be server side.<BR><BR>Either surround your script blocks with <BR>&#060;script language="VBScript" runat="server"&#062;......&#060;/script&#062;<BR>or &#060;% .... %&#062;

  3. #3
    Rodger C Guest

    Default RE: Connection Errors

    I wish it was that easy. Tried that with same error. <BR><BR>Signed "Gettin&#039 desperate"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •