Skip to content

bindImplLOB zero size (or NULL) HY104 "Invalid precision value" #3744

@ostropik

Description

@ostropik

Describe the bug
Connection:NetConn: 031088B8
Server:Not applicable

ODBC Diagnostic record #1:

SQLSTATE = HY104
Native Error Code = 0
[Microsoft][SQL Server Native Client 11.0]Invalid precision value

To Reproduce

  • CREATE TABLE Person (Name VARCHAR(30), Address VARCHAR(30), blob IMAGE)
void blobStmt()
{
	using namespace  Poco::Data;
	using namespace Poco::Data::Keywords;

	std::string Name("name");
	std::string address("Address");
	//CLOB blob("0123456789", 10);
	CLOB blob;
	auto ses = DbConnector::Get().GetSession();

	int count = 0;
	Statement ins = (ses << "INSERT INTO Person VALUES (?,?,?)", use(Name), use(address), use(blob));
	ins.execute();
	try { 
		ses << "SELECT COUNT(*) FROM Person", into(count), now; 
	}
	catch (...) { 
		std::cout << "Errr" << std::endl; 
	}
}

Expected behavior
Record with NULL in column 'blob'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions