pan wrote: > > From: "Chris MacKenzie" <[EMAIL PROTECTED]> > > I've come across an interesting problem. I'm trying to retrieve some > > text data (in this case a question up to 400 chars), but each time I > > perform a select statement I only receive the first 255 chars. > > > > What's the go here, is this just another microsoft thing ? > > > > Based on the paucity of data in your problem description I would > be inclined to trust the machine and ask what makes you think there > should be more than 'char(255)' worth of characters to retrieve? > > i.e., do you know the db.table.field in question is a column type meant > to hold the data you expect? You seem to be indicating a consistent > return of 255 when you ask for 400 - seems to be a clue about the > field specification.
Well, yes. The table in question is specified as such: CREATE TABLE [dbo].[tbl_exam_questions] ( [question_id] [int] IDENTITY (1, 1) NOT NULL , [question_text] [char] (400) NOT NULL , [correct_answer] [int] NOT NULL ) ON [PRIMARY] I've also used a strlen to measure the string length on submission to the db via a form post, and I've done the same on the returned string (also via a form post). On submission the test text I entered was 271 chars, after retreiving the text I only get 255 chars each time. I'm only using a very simple query (select * from tbl_exam_questions where question_id=x;) and using the microsoft client tools such as query analyser and ms sql enterprise manager, both return the full string. I've attached the two related php files that deal with the process, I can't see anything too horrible (other than my coding style) :-) -- Rgds, Chris MacKenzie Windows: "Where do you want to go today ?" Mac OS: "Where do you want to be tomorrow ?" Linux: "Are you coming or what ?"
edit_exam_question.php
Description: application/unknown-content-type-php_auto_file
update_exam_question.php
Description: application/unknown-content-type-php_auto_file
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php