MS access HELP!

Soldato
Joined
25 Jan 2003
Posts
11,536
Location
Newark, Notts
I'm a dud when it comes to coding and everything. Basically I have the following page setup:

http://g.1asphost.com/stebrown25/myweb2/products2.htm

At the moment the information in the fields only appears when its viewed on this machine as thats where the database is linked to, but how can i change it so it links to a database on the web server? Someones told me about server mappath or something but it means nothing to me so does anyone know what code EXACTLY that i have to replace to get it to work!?

Also, when using the filter option on that page, i get the same message everytime "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another". What the hell does this mean? When i do the same in access itself with the database it works without any problems.

HELP!
 
well normally youd have a connection string that pointed to wherever the database lives.

Heres an example of how ive set a page up using a connection string into a SQL Server database, similar thing for access though, just need to change provider:


Code:
Dim objRs, objConn
Dim strConnect
			
	
strConnect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=SQLTestUser;Password=xxxxxx;Initial Catalog=XBox;Data Source=ASHLEY\HOMER"
set objRs = Server.CreateObject("ADODB.Recordset")
objRs.Open strSearchString, strConnect, adOpenStatic, adLockPessimistic, adCmdTable

The SOURCE option inside the connection string is what you set, just add the IP and name of the database you want to connect to with the INITIAL CATALOG being the name of the database, in your case the .Mdb file. Ashley being the name of my machine and Homer is the database server name. XBox is the database within the server that i want to use.

Just google "connection strings ADO" or seomthing similar.


If you post up the code youre currently using to connect to the local database then we can no doubt tell you the tweaks you need to make to it.
 
Last edited:
Back
Top Bottom