Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 doubt

Author  Topic 

munish.gupta
Starting Member

2 Posts

Posted - 2006-09-16 : 09:13:39
Hi Sir,

i have a doubt which i want to clarify.

i am connecting easily my application to locally installed sql server. it is connecting to remotely installed sql server also even if i remove my locally installed server.

but i connect my application to remotely installed sql server from fresh installed PC with locally sql server or client, will i need any dll for that??

Thanks and Regards

Munish Gupta

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-09-16 : 17:37:59
What type of connection are you looking at ?

Go to Top of Page

munish.gupta
Starting Member

2 Posts

Posted - 2006-09-18 : 01:20:18
connecting my Visual C++ Application with SQl Server 2000 for database entry.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-09-18 : 02:36:07
I really dont know much about visual c ++

but i believe you can use an ODBC connection to bridge the gap. See also www.connectionstrings.com
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-18 : 02:46:55
Install latest MDAC package, which provides the data layer beteen your application and the database server.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-18 : 02:52:59
quote:
Originally posted by munish.gupta

connecting my Visual C++ Application with SQl Server 2000 for database entry.


Why are you using VC for the database application?

for making the connection to the SQL Server, create the DSN, maping to your database and then try out the following code.


//Create the ADO Connection pointer Object.
_ConnectionPtr pConApp;

// Now Create the Instacne of the pointer object.
pConApp.CreateInstance(__uuidof(Connection));

// Now open the Connection
CString strConnection;
strConnection.Format("Provider=MSDASQL.1;Data Source=<YourDSNName>");
pConAppTran->Open(_bstr_t(strConnection), _bstr_t("SA"), _bstr_t("Password"),adConnectUnspecified);


Chirag
Go to Top of Page
   

- Advertisement -