G
Guest
Seems the FillRowMethodName caused the problem?
C# works. but not C++?
using namespace System;
using namespace System:ata;
using namespace System:ata::Sql;
using namespace System:ata::SqlTypes;
using namespace Microsoft::SqlServer::Server;
public ref class AddNewUDF
{
public:
[Microsoft::SqlServer::Server::SqlFunction(FillRowMethodName = "FillRow")]
static IEnumerable MyUDF()
{
// Put your code here
SqlTypes::SqlString Value(L"Hello");
return Value;
}
static void FillRow(Object obj, SqlChars^ message, SqlChars^ category,
long^ instanceId)
{
message = gcnew SqlChars("Test");
category = gcnew SqlChars("Test");
instanceId = 123;
}
};
C# works. but not C++?
using namespace System;
using namespace System:ata;
using namespace System:ata::Sql;
using namespace System:ata::SqlTypes;
using namespace Microsoft::SqlServer::Server;
public ref class AddNewUDF
{
public:
[Microsoft::SqlServer::Server::SqlFunction(FillRowMethodName = "FillRow")]
static IEnumerable MyUDF()
{
// Put your code here
SqlTypes::SqlString Value(L"Hello");
return Value;
}
static void FillRow(Object obj, SqlChars^ message, SqlChars^ category,
long^ instanceId)
{
message = gcnew SqlChars("Test");
category = gcnew SqlChars("Test");
instanceId = 123;
}
};