Saturday, February 25, 2012

Please Help. Connecting To Server

Hi All,

I have been trawling the net to find a decent example of a way to connect to an sql 2000 server using asp.net and run a few commands.

One of the commands i need to run is: "EXEC sp_addlogin 'Albert', 'B1r12-36', 'forum2'"

Please, please, please could someone show me how to do this, and display a 'successful' message on the page if the command completed successfully...i will be eternally greatful.Hi,

This article might help:
Writing and Using Stored Procedures

Regards,|||Sorry to be thick, but after viewing that page i am still stuck.

I am not sure how to actualy connect to the server. The examples on that page show connecting to a specific database using 'trusted connections' , but what i want to do is really connect to the server using a username/password and run commands like, CREATE DATABASE.

If you could spare the time to knock up some code for me, i would be most greatful, and will even load some $ into a paypal account if you have one, just for the effort.

No comments:

Post a Comment