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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.