I am trying to connect to the client database from the application deployed in server. I have done this using ActiveXObjects. It is working fine in IE but problem with FireFox. Since FF don't allow ActiveXObjects i decided to do this without using ActiveXObjects.
It is very urgent can anyone help me in this.
Thanks in advance...
ActiveX is weird. It's IE only, and has special stuff it can do (and presents security risks, etc. to the user).
Daniel - Freelance Web Design | <?php?> | <html>| Deutsch | italiano | espa˝ol | portuguŕs | catalÓ | un peu de franšais | Ninasoma Kiswahili | 日本語の学生でした。| درست العربية
Thanks for giving advice.
Could you pls help me by providing the sample code to implement the solution.
Activex works without much problems on the server-side.
In ASP, ASP.NET they employ Activex.
Why don't you post the code you were using or the language preference for this job.
Code below is what i am using. This is working fine with IE, but problem with FF. Since FF doesn't support ActiveXObjects.
I need a sample code to connect client database from the server application(testDB.asp) which is compatible with IE and FF
pls help me it is very urgent.
var conn = new ActiveXObject("ADODB.Connection")
var conn_str = ""
var dbHost = ""
var dbUser = ""
var dbPassword = ""
var dbProvider = ""
var dbDefault = ""
dbHost = "localhost";
dbUser = "sa";
dbPassword = "";
dbProvider = "SQLOLEDB";
dbDefault = "Northwind";
conn_str = "Provider="+dbProvider+";Data Source="+dbHost+"; User Id="+dbUser+"; password="+dbPassword+"; Initial Catalog="+dbDefault;
alert("Error creating Connection")
Instead of using your database manipulation code on the client side do it in the server side so that your web server will process whatever database manipulation script before sending the results to the client browser.
It is not appropriate to have a database manipulating script in the client side script due to security reasons also.
Thanks for the help.
I have tried this earlier, but the problem is with DB connections across domains.
As per my knowledge since the application is placed on the webserver it is not possible to connect client DB from server.
Also i have the requirement to provide an interface to the users such that they can connect to their own databases(eg: SQLSERVER) simply by providing the DB details of localhost.
My approches so far i have done:
1) Initially i have tried this all with asp, but it raised an issue of DB connection not possible across domains.
2) Second i have tried this by completely migrating the application to client side using JS. but raised the problem with ActiveXobjects
Hope u got my problem. pls help me very urgent
Thanks in advance...
I am having difficulty with the way you are specifying your database location. Usually in a website development database will be either stored in the machine where your site resides or on another machine with which the web server machine has connectivity.
In your case you are telling that you need to connect to the databases that are in client machine(s). Are you telling that each user has their own database in their choosen database package?
Is this something not related to the normal web development process?
Connecting to client Database using ASP in IE and FireFox
yes, you are right. I need to manipulate the databases of client's from the server.
Could you pls help me in what way i can proceed with this kind of requirement using ASP and JS with SQLSERVER.
Thanks in advance. very urgent...
Because of this reason all the important operations like database manipulation are done at the server-side.
You can keep a centralised database rather than having a database on each of your clients, which is not practical at all due to so many reasons like accessibility, security, etc. If the client makes any change in the database (which can be done at their will as the database is stored in their machine) that will create problems for your script as a result you won't get the result as supposed.
I don't know what type of application/task you are dealing with but it would be better if you redesign the current application design.
You can post your problem in the forum so that you'll get more good ideas from the forums users and carry out your job in an efficient manner.