From: D S <daz...@gm...> - 2008-01-15 09:17:03
|
I like to write statements to the php error log so I can see exactly what's going on in my code (sort of like trace statements in Flash/Flex). That way you can determine whether the problem is with AMFPHP or a PHP/database issue. So with a problem like yours I would add this line after your Execute statement: $result = $DB->Execute($query); error_log("result: " . print_r($result, true)); Also I'm wondering if the 'identical' operator is too specific for this case: if ($result === false) Are you 100% confident that ADODB will always return the Boolean false? Are there any circumstances where it might return other 'fail' values such as -1 or an empty array? I don't use ADODB so I don't know the answer to that question but it might be worth trying: if(!result) Cheers, Darren. On 15/01/2008, Navanath <nav...@cl...> wrote: > > > Hi All, > > I am using the amfphp 1.2.6 version. I am using the following code to > retrieve the record set from the mssql database. > > PHP Code: > > $DB =ADONewConnection('odbc_mssql'); > $dsn = "Driver={SQL Server};Server=localhost;Database=myDb;"; > $DB->Connect($dsn,'sa','password'); > $DB->SetFetchMode(ADODB_FETCH_ASSOC); > > $query="SELECT * FROM users "; > $result = $DB->Execute($query); > > if ($result === false) { > trigger_error("Error executing query"); > } > else { > return $result->_queryID; > } > I am getting the following errors on the query browser > > Warning: unpack() [function.unpack]: Type d: not enough input, need 8, > have > 0 in C:\wamp\projects\amfphp\amf-core\io\AMFDeserializer.php on line 453 > > I have done R&D on the amfphp class why is not working and find the > following and found that issue is with the odbcAdapter.php file. > > Please help me to solve this issue. > > Thanks in advance. > Reply With Quote > -- > View this message in context: > http://www.nabble.com/Issue-with-the-Adodb-%28mssql-database%29-tp14753913p14753913.html > Sent from the amfphp-general mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > amfphp-general mailing list > amf...@li... > https://lists.sourceforge.net/lists/listinfo/amfphp-general > |