crazyswede Posted March 22, 2016 Share Posted March 22, 2016 See site: ccs2468.com/santa/aspquestion.txt I need you to show me how to open a data file for the *.accdb file format. Here's how I do it for *.mdb (2003) format - .var RelativePathToAccessFile = databasename; var AbsolutePathToAccessFile = Server.MapPath( RelativePathToAccessFile ); var FSO = Server.CreateObject("Scripting.FileSystemObject"); var ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + AbsolutePathToAccessFile + ";"; var ConnectionObject = Server.CreateObject("ADODB.Connection"); ConnectionObject.Open( ConnectionString ); var sql = "SELECT * FROM table1"; var rs = Server.CreateObject("ADODB.RecordSet"); rs.Open (sql, ConnectionObject); .For years I used Access2010 to create and edit files used by my ASP scripts; everything was in the *.mdb (2003) format. Now I have Access2013, and it creates files in the *.accdb format - that my scripts can't read. Sure, I can reformat the file into the old format, but that's sort of like devolution. Link to comment Share on other sites More sharing options...
thescientist Posted March 23, 2016 Share Posted March 23, 2016 do you have a question? Otherwise, this looks like a spam post. (I didn't both to click on that link as there is no immediate reason as to why I should as it related to answering a programming question) Link to comment Share on other sites More sharing options...
crazyswede Posted March 24, 2016 Author Share Posted March 24, 2016 I can't copy and paste to this window, and i'm terrible typist, so this link holds the major text. I need to know code to open *.accdb formatted file. ccs2468.com/santa/aspquestion.txt Link to comment Share on other sites More sharing options...
crazyswede Posted March 31, 2016 Author Share Posted March 31, 2016 will someone please reply? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 31, 2016 Share Posted March 31, 2016 You probably just need to change the connection string: http://www.connectionstrings.com/access-2010/ This page talks about an error also: https://support.microsoft.com/en-us/kb/926939 Linking to a text file with your question is not the best way of using this forum. If that URL goes away, for example, then the question is gone. The reason why posting the questions here along with the answer is better is so that people can find answers for their questions in the future. Link to comment Share on other sites More sharing options...
davej Posted March 31, 2016 Share Posted March 31, 2016 I've pasted it into the original post. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now