Hi
Thanks for your help. I modified my code and still got the same
error message:
Server object error 'ASP 0177 : 800706ba'
Server.CreateObject Failed
/webpages/resourceportal.asp, line 32
The RPC server is unavailable.
Do you think that this could be a problem with the drivers on the
server machine.
Here is my modified code:
<%
'check if username and password correct
if request.Form("txtusername")<>"" or request.Form
("txtloginpassword") <> "" then
dim BW_dblocation 'location of DB
dim BW_dbusername 'username to be checked against database
dim BW_dbpassword 'Password to be checked against database
dim BW_sql 'login SQL
dim BW_authorised 'page to redirect if login successfull
dim BW_failed 'page to redirect if login unsuccessfull
dim BW_dbdriver, BW_connect
dim rstemp
BW_dbusername = request.Form("txtusername")
BW_dbpassword = request.Form("txtloginpassword")
BW_authorised = "resourcepages/resourcemain.asp"
BW_failed = "resourceportal.asp?login=failed"
'open database
BW_dblocation=server.MapPath("/databases/programdata.mdb")
BW_dbdriver = "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data
Source="
BW_connect = BW_dbdriver & BW_dblocation & ";"
BW_sql = "SELECT * FROM Login WHERE Username='" &
BW_dbusername & "' AND Password='" & BW_dbpassword & "';"
set conn=Server.CreateObject("ADODB.Connection")
conn.Open BW_connect
'get recordset
set rs_login=server.CreateObject("ADODB.recordset")
BW_sql = "SELECT * FROM Login WHERE Username='" &
BW_dbusername & "' AND Password='" & BW_dbpassword & "'"
rs_login.open BW_sql, conn
'check if login details correct
if NOT rs_login.eof or NOT rs_login.bof then
'userdetails are correct so login user
Session("time")=time() 'sets time that user logged in
Session("BW_firstname") = Cstr(rs_login.fields.item
("FirstName").value) 'stores user's 1st name
Session("activecheck")="yes" 'confirms if user is
already logged into the site
rs_login.close
conn.close
response.Redirect(BW_authorised)
else
'details are wrong so redirect user back to login
page
rs_login.close
conn.close
Session("MM_UserAuthorization")=""
response.Redirect(BW_failed)
end if
end if
%>
Thanks for all your help.
Cheers
Blair
--- In [EMAIL PROTECTED], Charles Carroll
<[EMAIL PROTECTED]> wrote:
> You forgot the Provider=
> part at beginning.
>
> http://www.learnasp.com/learn/dbopen.asp
> has the correct connection string as a reference.
>
> On Wed, 01 Dec 2004 10:18:41 -0000, blair_woodsnz
> <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi
> >
> > I have created a site which is being hosted on a remote
computer.
> > When I try to login to the site by connecting to the database
on the
> > remote computer I get the following error message:
> >
> > Server object error 'ASP 0177 : 800706ba'
> >
> > Server.CreateObject Failed
> >
> > /webpages/resourceportal.asp, line 27
> >
> > The RPC server is unavailable.
> >
> > My code for connecting to the server is:
> >
> >
BW_dblocation="D:\InetPub\Hosts\asptlnsite\databases\programd
> > ata.mdb"
> > set conn=Server.CreateObject("ADODB.Connection")
> > conn.Provider="Microsoft.Jet.OLEDB.4.0"
> > conn.Open BW_dblocation
> >
> > Thanks heaps
> >
> > Blair
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Sponsor
> >
> > ADVERTISEMENT
> >
> >
> > ________________________________
> > Yahoo! Groups Links
> >
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
> >
> > To unsubscribe from this group, send an email to:
> > [EMAIL PROTECTED]
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/