meistaiwan Posted June 29, 2006 Share Posted June 29, 2006 So I've starting using SQL2005 as my backend for php.Last project I used the mssql libraries to connect, this project I need unicode support so I went with ADODB.It's working fine so far, until I got to large data types. My connection string looks like this: $db = new COM("ADODB.Connection") or die("Cannot start ADO"); $dsn = "Driver={SQL Server}; Server=xxxx,1533; Database=TCxxxct; UID=wxxx; PWD=!xxxx?;"; $db->Open($dsn);$rs = $db_connection->Execute("SELECT Comments, submitted_by, CONVERT(varchar,date_submitted,20) as date_submittedFROM commentsWHERE ([Customer Number] = ".$_GET['id'].")");this part hereecho $rs->Fields['Comments']->Value."</b></i></td></tr></table>";gives 0 for the 'Comments' Value. If I convert it to varchar(255) before sending it to adodb, it works as the rest of my values(works for numbers, varchar, nvarchar, etc).With this ntext field, the following things happen:->Value returns 0->ActualSize returns -1I've tried Fields['Comments']->GetChunk(8000), returns some kind of error. [i]Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft OLE DB Provider for ODBC Drivers Description: Multiple-step OLE DB operation generated errors. Check each [/i]Anybody have some working code or know of how this is supposed to work?Thanks,Jimmy Quote Link to comment https://forums.phpfreaks.com/topic/13246-adodb-connection-and-ntext-types/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.