|
|||
|
Hi
i create a program which accept the data and save it to Access database(mdb) file. Every thing is completed. but now i want to change the database. i want to use the SQL2000. what changes i have to made in program to work with SQL2000. plz give me a example if you can. thankx |
|
|||
|
You must change the connection string
Code:
var conn = new ActiveXObject("ADODB.connection");
var db_name = "Driver={SQL Server};server=db_server_name_or_ip;database=database_name;uid=username;pwd=password";
conn.Open(db_name);
|
|
|||
|
thankx
1. suppose the IP address is 127.28.24.10 server name is SA database name is myone table is myWork //******************** 2. AND IF THE DATABASE IS IN A SUB FOLDER OF 127.25.24.10 CLINT COMPUTER THEN HOW TO GET THE DATA how to fit it in your code |
|
|||
|
Code:
var conn = new ActiveXObject("ADODB.connection");
var db_name = "Driver={SQL Server};server=SA;database=myone;uid=username;pwd=password";
conn.Open(db_name);
|
|
|||
|
thank you very much for reply
if the sql is in another computer where i will place the Ip address of the SQL database . what is the format of the address(http:// ?) suppose the ip address is 127.28.24.10 var conn = new ActiveXObject("ADODB.connection"); var db_name = "Driver={SQL Server};server=SA;database=myone;uid=username;pwd= password"; conn.Open(db_name); ********* and if the access mdb database is in the Sub folder on a another computer . how to connected with it. what is the format of the address(http:// ?) suppose the Ip address is 127.10.10.5 in drive C:\ in folder ABC in Sub folder XYZ the file name is DATA.MDB |
|
|||
|
You can get more details about how to set the connection strings from the following links
http://www.connectionstrings.com/ http://www.sqlstrings.com/ http://www.codeproject.com/database/...ionstrings.asp |
|
|||
|
THANKX FOR REPLY
I THINK I AM UNABLE TO EXPLAIN MY REQUEST THE PROBLEM IS NOT THE STRING. THE PROBLEM IS THAT I AM NOT USETO WITH SQL2000. I AM GOOD WITH ACCESS(MDB). ALL COMPUTERS NETWORING IS LAN THE SQL2000 SERVER IS PLACED IN ANOTHER COMUTER AND THIS PROGRAM WILL SAVE THE DATA IN THE SQL2000 DATABASE. SO WHERE AND HOW WILL I PLACE THE path OF THE SERVER COMPUTER. PLEASE GIVE ME A EXAMPLE OF PERFECT WORK. I DO NOT KNOW WHERE I WILL PLACE THE PATH IN THAT STRING AND HOW TO IMPLEMETN IT ar conn = new ActiveXObject("ADODB.connection"); var db_name = "Driver={SQL Server};server=SA;database=myone;uid=username;pwd= password"; conn.Open(db_name); SUPPOSE: IP=125.13.12.11 SERVER NAME IS B3Y8Z9 DATABASE IS MYDB USER NAME IS SA NO PASSWORD RIGHT NOW NOW THAT TIME THE SQL2000 IS ON MY LOCAL COMPUTER. BUT WHEN THE PROJECT WILL OK THE IT WILL WORK WITH A ANOTHER COMPUTER'S SQL2000 DATABASE PLEASE HELP ??? THANKX |
|
|||
|
IT WORK WELL ON LOCAL SQL DATABASE
BUT HOW TO CONNECT WITH REMOTE DATABASE OF SQL2000 FROM CLIENT only tell me in your code WHERE I WILL PLACE THE IP ADDRESS of the remote database WHERE I WILL PLACE THE IP ADDRESS of the remote database WHERE I WILL PLACE THE IP ADDRESS of the remote database WHERE I WILL PLACE THE IP ADDRESS of the remote database WHERE I WILL PLACE THE IP ADDRESS of the remote database WHERE I WILL PLACE THE IP ADDRESS of the remote database WHERE I WILL PLACE THE IP ADDRESS of the remote database thankx ??? |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|