vc connect to sqlserver

How to connect to sqlserver using vc++
0
5/20/2008 2:18:50 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
837 Views

Similar Articles

[PageSpeed] 48

Using what library?
			joe

On Mon, 19 May 2008 19:18:50 -0700 (PDT), Rajendra.Arayur@gmail.com wrote:

>How to connect to sqlserver using vc++
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15973)
5/20/2008 2:24:20 AM
<Rajendra.Arayur@gmail.com> ha scritto nel messaggio 
news:32bc726d-c732-4955-b81a-b82c2c2d8e22@a9g2000prl.googlegroups.com...
> How to connect to sqlserver using vc++

Hi Rajendra,

as Joe correctly points, you have several options and several libraries and 
technologies to connect to a database.

You can use OLE DB Templates (a set of C++ template classes, part of ATL 
library).

http://msdn.microsoft.com/en-us/library/8k76sd16(VS.80).aspx

And there are also multiplatform solutions, like SQLAPI++:

http://www.sqlapi.com/

Moreover, I believe that if you go to sites like SourceForge 
(http://sourceforge.net) you will find several other libraries...

I don't know if it is possible to use .NET classes (like those in the 
namespace System.Data.SqlClient) using C++/CLI...

HTH,
Giovanni


0
5/20/2008 8:03:02 AM
Reply:

Similar Artilces:

Cannot Connect to Exchange 2003
I have just completed an Exchange2003 installation and everything went fine. I am able to connect to Exhange with the Outlook Web Access client and with Outlook Express. However when I try to add an Outlook 2003 clent i get the following error "The name could not be resolved. The Bookmark is Invalid" I have check AD and DNS and everything is worjing correctly. Please Help Thanks Rick Alain, Thanks for the help but I cannot seem to find the post you are refering to. I have search all newsgroupps with no results. Please Advise Thanks Again, Rick >-----Original Mess...

To use xml files in vc++ resource editor..
Hi..please tell how to use xml files in vc++ resource editor so that we can access it from our application..Thanks What exactly you goin gto do with that XML file -- With Regards Alok Gupta Visit me at http://alok.bizhat.com "I think this will Help" "Mncyb2004" <Mncyb2004@discussions.microsoft.com> wrote in message news:FBC6EF97-1B6F-4012-9FAA-6B437EBC0AD8@microsoft.com... > Hi..please tell how to use xml files in vc++ resource editor so that we can > access it from our application..Thanks The question is a little vague. Do you...

How to share printer connected to Windows 7 pc with a pc using Vista ?
I have upgraded to Windows 7 and now face the problem that no one else but myself can use the printer. Before I had a home network setup and all other pc's connected via wireless network to print. How to I setup just the printer so others can use it ? Jason, Have you enabled printer sharing in Network and Sharing Center? Have you shared your printer already? Carlos "Jason" wrote: > I have upgraded to Windows 7 and now face the problem that no one else but > myself can use the printer. > > Before I had a home network setup and all other pc&...

trouble connecting to Exchange using RPC over HTTPS
I set up RPC on our Exchange 2003 server w/SP1. When I try to connect using Outlook from the network it asks for a username and password and connects without a problem. Next I try to connect from outside the LAN using Outlook which is configured the same way and using a broadband connection. I startup Outlook and it prompts me for username and password. After that it seems to hang for a couple minutes then it gives the following message. "The connection to the microsoft exchange server is unavailable. Outlook must be online or connected to complete this action." I configured ...

Outlook 2002 and IMAP: Fails to stay connected to IMAP server
Good day, everyone! I'm using Outlook 2002 and Gmail's IMAP service. I'm trying to figure out where the fault lies with my issue. My issue is that Outlook will lose connection to Gmail's IMAP service after a period of inactivity, which prevents me from knowing when I receive new email during this loss of connection. I have to enable a POP3 check to indicate I have mail in case the connection has failed. I have this incoming mail then automatically deleted. Has anyone had this problem? Is this an issue with Outlook or Gmail's IMAP service or just the nature of t...

DAO 3.50 and VC++7
Can I force VC++7.0 to use DAO 3.50 or 3.51 instead of 3.60? In VC++6.0 we could set the DAO verion using something similar to: AfxGetModuleState()->m_dwVersion = 0x0421 This does not appear to work in VC++7.0 as no matter what this is set to DAO 3.6 is always loaded. We would like to do this as we hold binary data in MS Access memo fields and this appears to get converted. We can move the data to an OLE type field but this is not conveninet for backwards compatibility. Peter, Are you creating a new database at run time and attempting to re-create the 'old' schema, or ...

Outlook not finding connection or pop server
AAArrrrggggghhhhhh! Outlook keeps showing a message stating it can't find the server. I'v checked the account set up and it's set for the cable modem. When i does find it it keeps asking for my password. When I put it in an click ok, it asks for it again! Please help ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ...

vc++ #6
how do we can link our header file (*.h)? header files are not linked. they are normally included with a c/c++ file during compilation. object files and libraries are linked. "m" <paridar@azadinet.net> wrote in message news:OqfcbLqVEHA.1952@TK2MSFTNGP12.phx.gbl... > how do we can link our header file (*.h)? > > m, > how do we can link our header file (*.h)? By including them in your source files (*.c or *c.pp) and compiling, then linking the source files. -- Jonathan Wood SoftCircuits http://www.softcircuits.com Available for consulting: http://www.softc...

Connection and retrieve image from scanner
Dear, I need to connect and get the image from scanner, but i dont have idea how to begin? Raed, I guess you should try twain for this, see for example here: http://www.codeproject.com/audio/twaintest.asp Johan Rosengren Abstrakt Mekanik AB "Raed Sawalha" <RaedSawalha@discussions.microsoft.com> skrev i meddelandet news:AA4EB445-6538-4088-AB94-B8A8971066E9@microsoft.com... > Dear, > I need to connect and get the image from scanner, but i dont have idea how > to begin? ...

how to convert a VC program to service???
I wrote a program.I want to run the program by using windows NT service.how to convert a VC program to service???This program is not GUI based...Its only MFC program.... Read about how to write a service. There are some kludges, but nothing substitutes for doing the job right and simply writing it as a service. Note that there can be no output, such as printf, coming from the app, since it cannot appear anywhere. joe On 1 Jan 2007 21:00:29 -0800, "meenu" <mnair.lekshmi@gmail.com> wrote: >I wrote a program.I want to run the program by using windows NT >service.h...

RMS and HQ connection error
Hi I am having trouble with HQ connection after i change store name in one of our store using RMS store. I changed store name and HQ client had error when it tried to connect to HQ Therefore I also changed name of store at 'store' table field at HQ database by using query analyzer but it still having connection problem. How can i resolve my problem? Please be advised. As long as you didn't change the ID, it shouldn't matter. My guess is that you actually ended up changing the password for the store connection, or the port number the store is trying to connect to. It's...

Porting issue from VC++.6 to VC++.NET
Hi, I am doing migration of MFC code from CV++.6 to VC++.NET . I found a difference between handing MFC "ON_COMMAND" message function prototype. In VC++ .6 the function prototype is BOOL FUN(WPARAM, LPARAM). But in VC++.NET the function prototype is void FUN ( ). My Question - How will I get wparam inside VC++.NET ?? I am giving the function which is compiled in VC++.6 BEGIN_MESSAGE_MAP( ON_COMMAND(IDC_COMBO, OnCommand) BOOL EditorCombo: OnCommand(WPARAM wParma, LPARAM lParma) { if(LOWORD(wParma == IDC_COMBO ) { switch(HIWORD(wParma)) ...

VC BUG
The code has problem, but comiplie ok! link ok void CMyDialog::OnOK() { extern CButton m_DLG1_IDOK_n; //m_DLG1_IDOK_n not exist CButton m_DLG1_IDOK; if(m_DLG1_IDOK_n.GetCheck == m_DLG1_IDOK.GetCheck) // Call function without (), like vb return; CDialog::OnOK(); } Envirment: XP + VC6.0 Bob wrote: > The code has problem, but comiplie ok! link ok > > void CMyDialog::OnOK() > { > extern CButton m_DLG1_IDOK_n; //m_DLG1_IDOK_n not exist > CButton m_DLG1_IDOK; > > if(m_DLG1_IDOK_n.GetCheck == m_DLG1_IDOK.GetCheck) // Call function > wi...

HELP: Connecting Visio and Database
hi there In order to generate some reports I have to color a map containing 1000 shapes. The manual way is just a no-go, so I decided to connect the drawing with some kind of a database (Access or Excel). I made some experiments; however with no real success. Can anybody give me some advises: - Is it even possible to connect a Visio drawing with 1000 shapes with an Excel-Sheet on a PC with 128MB RAM? - Is there any tutorial documentation for that specific purpose available (preferably on the Web)? - Is there a book recommendation that is covering exactly this topic? - Is there anybody, tha...

How to change which server the Outlook Client is connected to?
We are currently setting up multiple CRM databases in order to have a development environment and a live sales environment. How do I swap the Outlook client over between servers? Thanks Brad Not sure if this is what you are looking for, but try going to regedit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM The servers that the outlook client attaches to are here. Note there are two url's you'll need to change: ServerURL and WebAppUrl. Toby bradsprigg@yahoo.com.au (Brad Sprigg) wrote in message news:<dc320d68.0402101741.2fada764@posting.google.com>... > We are currently s...

From VC++ pro to VC++ 2005?
I'm not a programmer by trade, but have gotten somewhat comfortable with VC++ 6 pro. Is it recommended to upgrade to VC++ 2005? Will VC++ 2005 make it easier for me to make sure that my applications remain compatible with Vista? What is your experience in changing from VC++ 6 to VC++ 2005? Any comments are appreciated. Harald "Harald" <Haraldnospamcollonia@yahoo.com> wrote in message news:NbdJh.11916$Jl.4186@newsread3.news.pas.earthlink.net... > I'm not a programmer by trade, but have gotten somewhat comfortable with > VC++ 6 pro. Is it recommended to...

Connection to Server was Interrupted
I keep getting this error: Connection to Server was Interrupted. I see that others have also got this error. I can send and receive mail fine, but I always get this error at the end. I have tried everything that was in the knowledge base to fix it, but I still get the same error at the end of every send/receive. I use a spam filter from mailwasher.net. This utility also reports the same error. This is very annoying. What is wrong???? Everything was working fine until mid-November. This error just suddenly appeared. ...

Crystal Report XI in VC++ 6.0
Hi, I have an application written in VC++ 6.0 (native code). I want to call the reports created/saved in Crystal Report XI from my code. Can anybody help me in doing this ? Thanks in advance. ...

vc++6 program in vc++.net
How to write vc++ 6 program in vc++.net? > How to write vc++ 6 program in vc++.net? > You can't. If you mean 'how can I create non .NET applications' then you just have to select win32 or MFC projects when creating a new project. That way your code does not use the .NET framework, but the win32 and MFC api instead. These projects are equivalent to VC 6.0 projects. it is also not possible to convert vc++.net projects back to VC6.0. without manually creating the vc6 projects and manually porting the code. There are huge differences between VC 6.0 and VC 2003 and VC200...

Outlook Users Cant Connect
Each day between 11am-1pm users are unable to open their mailboxes on one of our Exchange Servers. When they hit send/receive Outlook hangs and after roughly 15mins they get the message... "Unable to display the folder. Network problems are preventing connection to the Microsoft exchange server computer" We have 4 Exchange Servers....2 are Exchange 2000 and 2 are newly installed Exchange 2003 servers. The EVS with the problem is one of the 2003 servers and the mailboxes on it have all been migrated from the 2000 servers two weeks ago. This EVS also has a PF store, which doesn...

Defining custom connection point
Hi all, A general rectangle has five connection point, four at the corners and one at the center. Now I want to define my own connection point, maybe somewhere between the center and the right-bottom corner, how to do this? Besides, can I remove an existing connection point from a shape? Thanks! You can use either the Connection Point Tool (dropdown below the Connector Tool) or the ShapeSheet. I prefer the ShapeSheet because you can insert a row and enter relative formulae for the X and Y location of the point "Sam Huang" <samhng@gmail.com> wrote in message news:be31f2e6-...

Re: connection fails daily
On 18/12/2009 23:42, fcsark9handler wrote: ????????? *What* did the poster write? -- Dave (Sometimes man stumbles over the truth ...... Sir Winston Churchill) ...

Problem in converting VC++ code to managed VC.NET code
Hello, I've a vector in VC++ code. I'm trying to convert into managed VC.NET code public ref struct MsgStructure sealed { unsigned char *m_pucData; unsigned long m_ulLen; } ; public ref class CCircBuffer { public: vector<MsgStructure^> MsgList; // this is the line i'm getting the error. }; When i compile this code i'm getting the following error. e:\vs.net 2005 pro\trials\dim\dim\CircBuffer.h(41) : error C4368: cannot define 'MsgList' as a member of managed 'CCircBuffer': mixed types are not supported. Can anyone help me sorting out this problem...

Corrupt connection to data file
See below for my original post and a reply, here are some more details. I installed Optlook 2003 on my new PC then copied my Outlook.pst file from my old machine to the new machine and that resulted in 2 Personal Folders appearing. I don't recall now exactly how but I managed to get rid of one of them and Outlook uses the other one (copied from old PC) just fine until I try to access the Advanced Options for the folder so I can compress the data file. By "Second Mail Folder" I mean that I have a Personal Folders where I have all my personal emails and I also have a Work Re...

Internet connection, but visio 2003 not detecting...how can i act.
Ok...I just installed it and I have an internet connection but it isnt detecting the internet connection. I uninstalled and reinstalled and nothing is helping. I need this program for my class and nothing is working. It wont even give me the option to activate by phone...Help! Lol are you firewalled? al "angelay929" <angelay929@discussions.microsoft.com> wrote in message news:FA17E716-25F3-48A9-B770-22EC224DB4FB@microsoft.com... > Ok...I just installed it and I have an internet connection but it isnt > detecting the internet connection. I uninstalled and reinsta...