Pass NULL to stored procedure with ADO
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hi all, I have a situation where I wish to pass a NULL to a varchar(200) parameter of an SQL Server stored procedure using ADO and Visual C++. I have tried various things, but with no success. Anybody done this before? Thanks, Bob.
-
Hi all, I have a situation where I wish to pass a NULL to a varchar(200) parameter of an SQL Server stored procedure using ADO and Visual C++. I have tried various things, but with no success. Anybody done this before? Thanks, Bob.
you can try variant_t vtNull; vtNull.ChangeType(VT_NULL); and pass that. There is no constructor to make a variant NULL from the start. Also make sure the size parameter is 200 as your varchar is defined with a length of 200. :cool: