Hi all!! I am very sorry for posting this question here but i'm really really really stuck. I am trying to connect to an access database using asp flash.......... i cant seem to get the scripts to connect with the database. I am using windows xp professional and have installed IIS. the following is my ASP code for connecting to the database and adding a new user. I keep getting an error which says there is a syntax error in the from clause but i don't see this.??? Once again sorry for posting this here but have been trying to fix this for 3 days now and am going mad!!! thanks to everyone for your patience :) <%Language='VBScript'%> <% Dim rs, conn, strSQL Set rs = Server.CreateObject('ADODB.Recordset') Set conn = Server.CreateObject('ADODB.Connection') 'strSQL = 'SELECT [User_Name], [User_Dept], [User_Password] FROM [tblUser]; strSQL = 'SELECT * FROM User;' conn.ConnectionString = 'Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info = False;Data Source=' & Server.MapPath('\Library.mdb') 'conn.Open 'DSN=Library' conn.Open rs.CursorType = 2 rs.LockType = 3 rs.Open strSQL, conn response.write('hello') rs.AddNew rs.Fields('User_Name') = Request('name') rs.Fields('User_Dept') = Request('dept') rs.Fields('Password') = Request('passwd') rs.Update 'Clean up resources rs.Close Set rs = Nothing conn.Close set conn = Nothing %>
hey everyone problem solved at last!!! The name of my table users must have been a reserved word or something cos when i changed it to Administrators the script works!
Don't see what you're looking for? Try a search.
|