sqlvarchar

C++ Convert SQLVARCHAR to string

I need to convert from a SQLVARCHAR to a string data type variable definitions as follows: string strFirstName; SQLVARCHAR rtnFirstName[50]; Want to be able to accomplish the following: if (strFirstName.empty()) strFirstName = rtnFirstName; Gives an error that the binary '=': no operator found which takes a right-hand operand of ty...

Should I use an inline varchar(max) column or store it in a separate table?

I want to create a table in MS SQL Server 2005 to record details of certain system operations. As you can see from the table design below, every column apart from Details is is non nullable. CREATE TABLE [Log] ( [LogID] [int] IDENTITY(1,1) NOT NULL, [ActionID] [int] NOT NULL, [SystemID] [int] NOT NULL, [UserID] [int] NOT NULL, [LoggedOn...