Tuesday, March 27, 2012

Calling stored procedure from a C application

I have an ODBC/C program and I want to call the stored procedures
sp_addlogin and sp_adduser in it. Can someone please provide me with
some sample code showing the best way to do this.[posted and mailed, please reply in news]

Jocky MacLochray (ian.lochray@.ssi-world.com) writes:
> I have an ODBC/C program and I want to call the stored procedures
> sp_addlogin and sp_adduser in it. Can someone please provide me with
> some sample code showing the best way to do this.

http://www.microsoft.com/downloads/...&DisplayLang=en

These samples were also in the original Books Online that came with SQL
Server, but was removed from later versions. The above link gives you
revised samples. I believe the main difference is that the revised samples
uses Windows authentication.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <esquel@.sommarskog.se> wrote in message news:<Xns955E841276F14Yazorman@.127.0.0.1>...
> [posted and mailed, please reply in news]
> Jocky MacLochray (ian.lochray@.ssi-world.com) writes:
> > I have an ODBC/C program and I want to call the stored procedures
> > sp_addlogin and sp_adduser in it. Can someone please provide me with
> > some sample code showing the best way to do this.
> http://www.microsoft.com/downloads/...&DisplayLang=en
> These samples were also in the original Books Online that came with SQL
> Server, but was removed from later versions. The above link gives you
> revised samples. I believe the main difference is that the revised samples
> uses Windows authentication.

Hi,

Did you try using EXEC sp_addlogin from C program.

No comments:

Post a Comment