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:
|