Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Null values do not compile...

From: Maarten Schrijvers <maarten.schrijvers(at)gmail.com>
Date: Tue Oct 02 2007 - 11:00:55 EDT


I have some fields which can be (SQL) NULL. If they are filled they are varchar, but they're not necessary, so they could be NULL. Compiling gives me an error though:

c:\mysql++\include\null.h(206) : error C2593: 'operator =' is ambiguous

1> E:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(923): could be 'std::basic_string<_Elem,_Traits,_Ax>
&std::basic_string<_Elem,_Traits,_Ax>::operator =(_Elem)'

1> with

1> [

1> _Elem=char,

1> _Traits=std::char_traits<char>,

1> _Ax=std::allocator<char>

Do you need help?X

1> ]

1> E:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(918): or
'std::basic_string<_Elem,_Traits,_Ax>

&std::basic_string<_Elem,_Traits,_Ax>::operator =(const _Elem *)'

1> with

1> [

1> _Elem=char,

1> _Traits=std::char_traits<char>,

1> _Ax=std::allocator<char>

1> ]

1> E:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(913): or
'std::basic_string<_Elem,_Traits,_Ax>

&std::basic_string<_Elem,_Traits,_Ax>::operator =(const
std::basic_string<_Elem,_Traits,_Ax> &)'

1> with

Do you need more help?X

1> [

1> _Elem=char,

1> _Traits=std::char_traits<char>,

1> _Ax=std::allocator<char>

1> ]

1> while trying to match the argument list '(mysqlpp::sql_varchar, mysqlpp::null_type)'

1> c:\mysql++\include\null.h(204) : while compiling class template member function 'mysqlpp::Null<Type>::operator Type(void)'

1> with

Can we help you?X

1> [

1> Type=mysqlpp::sql_varchar

1> ]

1> e:\visual studio 2005\projects\t_1\urenregistratie\Relatieonderhoud.h(25) : see reference to class template instantiation 'mysqlpp::Null<Type>' being compiled

1> with

1> [

1> Type=mysqlpp::sql_varchar

1> ]

Can't find what you're looking for?X

I have declared the following:

typedef mysqlpp::Null<mysqlpp::sql_varchar> Nullstr;

static Nullstr vVoornamen = mysqlpp::null; //gave the variable a value trying to avoid the error

What am I doing wrong? Received on Tue Oct 2 11:01:30 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:03:24 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library