Jump to content

SQLBIT Problem


Darklink

Recommended Posts

There's not really a lot of support for the MSSQL functions is there? Alot of what's on the internet is the same thing.

 

Anyway, I am having no problems with using stored procedures with SQL Server right up until I need to get my output with values using SQLBIT.

Instead of returning 1 or 0 like it should, it's returning me with an 8bit number, which changes every couple of minutes strangely. As if it was a timestamp, except its not.

 

I am using some fairly complex class I've written to execute my stored procedures, however I am absolutely certainly positive that I am sending the correct information as I've written to output everything that has been sent to the server.

 

It's simple, like so:

 

mssql_bind($sproc, '@NameExists', $retval['NameExists'], SQLBIT, true);

 

Now $retval['NameExists'] should either be 0 or 1. But instead it returns me an 8 bit random number.

 

I am using Windows Server 2003 with PHP 5.2.3.

 

Hope someone can help me.

Thanks

 

EDIT: I would just like to say, that I can send SQLBIT to SQL Server. Just isn't working as an output value.

Link to comment
https://forums.phpfreaks.com/topic/97097-sqlbit-problem/
Share on other sites

I've managed to fix this error, doing it the wrong way however.

 

I changed the output datatype to SQLVARCHAR(1). But why the hell would it work this way and not with SQLBIT?

 

Note: That it works with SQLVARCHAR with 50 characters to, so it's not just the first number!!

Link to comment
https://forums.phpfreaks.com/topic/97097-sqlbit-problem/#findComment-496868
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.