Unix Technical Forum

Calling stored procedure from a C application

This is a discussion on Calling stored procedure from a C application within the SQL Server forums, part of the Microsoft SQL Server category; --> I have an ODBC/C program and I want to call the stored procedures sp_addlogin and sp_adduser in it. Can ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 04:11 AM
Jocky MacLochray
 
Posts: n/a
Default 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 04:11 AM
Erland Sommarskog
 
Posts: n/a
Default Re: Calling stored procedure from a C application

[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/d...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/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 04:11 AM
Raju
 
Posts: n/a
Default Re: Calling stored procedure from a C application

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/d...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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:21 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com