DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 16 Aug 2007 17:59:18 -0700,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    Boyd
          2    Sergey Poberezovskiy


setting up for calling a stored procedure   
Hi, 
I am using vs .net 2005, .net frameworks v3.0, vc++ 2005, on vista
I am trying to write a c++ app to call a sql stored procedure.

the following code genrates an error trap and I don't know why:

String ^myConnectionString = "Initial Catalog=ncxSQL;Data 
Source=ENVISION-MOD;Integrated Security=SSPI;";
 SqlConnection ^myConnection;
myConnection->ConnectionString =  myConnectionString;

Any words of wisdom?
Date:Thu, 16 Aug 2007 17:59:18 -0700   Author:  

RE: setting up for calling a stored procedure   
I'm not an expert in C++, but it looks like you are trying to assign a 
property to uninitialized object (myConnection).
Create an instance by invoking the contructor, and you should be fine.
As I said before, do not know C++ syntax, but in C# it would look like:
SqlConnection myConnection = new SqlConnection();

"Boyd" wrote:


> Hi, 
> I am using vs .net 2005, .net frameworks v3.0, vc++ 2005, on vista
> I am trying to write a c++ app to call a sql stored procedure.
> 
> the following code genrates an error trap and I don't know why:
> 
> String ^myConnectionString = "Initial Catalog=ncxSQL;Data 
> Source=ENVISION-MOD;Integrated Security=SSPI;";
>  SqlConnection ^myConnection;
> myConnection->ConnectionString =  myConnectionString;
> 
> Any words of wisdom?
> 
> 
Date:Thu, 16 Aug 2007 19:02:00 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us