Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

asp connect to access DB

Please help. I'm trying to allow other to acces my DB from their PC and it is not working. I'm new to ASP. I've set permissions and shared to the inetpub and made the user/password annonymous. I can me reach at:ltworf13@hotmail.com or robert.wynter@rci.rogers.com

here is the code:


<%
Dim Conn
dim SQL
dim RS
DIM strConn
DIM SHOWALL

'Define the OLE DB connection string.
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:InetpubwwwrootCCD_EmployeesEmployeeDB.mdb"

if request.form("keywordlast") = "" AND request.form("keywordfirst") = "" then
SHOWALL = True
else
SHOWALL = False
end if
%>
<%if SHOWALL = True then%>
<%
SQL = "Select * from tblemployee order by Lname asc"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:InetpubwwwrootCCD_EmployeesEmployeeDB.mdb"
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.open SQL, Conn
%>
<%Do while not RS.EOF%>
















<%RS.Movenext
Loop
%>
<%else%>
<%
if request.form("keywordlast") <> "" then
SQL = "Select * from tblemployee where lname = '" & request.form("keywordlast") & "'"
else
SQL = "Select * from tblemployee where fname = '" & request.form("keywordfirst") & "'"
end if
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open STRConn
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.open SQL, Conn
%>
<%if not rs.eof and not rs.bof then %>









<%end if%>
<%end if%>
ID Employee ID Last Name First Name Manager Name UPDATE EMPLOYEE
<%=RS("Id")%>  <%=RS("EmpID")%>  <%=RS("LName")%>  <%=RS("FName")%>  <%=RS("MgrID")%> 
 a rel="nofollow" href="edit_form.asp?method=edit&id=%=RS(" id="">">EDIT-
a rel="nofollow" href="add_edit_delete_script.asp?method=delete&id=%=RS(" id="">">DELETE-
 
<%=RS("Id")%>  <%=RS("EmpID")%>  <%=RS("Lname")%>  <%=RS("Fname")%>  <%=RS("MgrID")%> 
ADD-
a rel="nofollow" href="edit_form.asp?method=edit&id=%=RS(" id="">">EDIT-
a rel="nofollow" href="add_edit_delete_script.asp?method=delete&id=%=RS(" id="">">DELETE-
FIND-
SHOW ALL


<%
Rs.Close
Set RS = nothing
Conn.close
Set Conn = nothing
%>


Comments

  • ManningManning Posts: 1,621Member
    : Please help. I'm trying to allow other to acces my DB from their PC and it is not working. I'm new to ASP. I've set permissions and shared to the inetpub and made the user/password annonymous. I can me reach at:ltworf13@hotmail.com or robert.wynter@rci.rogers.com

    It's good that you posted the code, but it would help if you also posted the error messages you are receiving, and point out what line number it refers to.

  • ltworf13ltworf13 Posts: 22Member
    : : Please help. I'm trying to allow other to acces my DB from their PC and it is not working. I'm new to ASP. I've set permissions and shared to the inetpub and made the user/password annonymous. I can me reach at:ltworf13@hotmail.com or robert.wynter@rci.rogers.com
    :
    : It's good that you posted the code, but it would help if you also posted the error messages you are receiving, and point out what line number it refers to.
    :
    :
    Good point sorry. here is the error:
    error '8002801c'
    Error accessing the OLE registry.

    /iisHelp/common/500-100.asp, line 10

    I can see a part of the table but not the DB instead I get the over error.


Sign In or Register to comment.