Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-05-2008, 12:09 PM
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default MSSQL server problem

Hello Friends,
I m newbie to zend framework.
I m trying to connect mssql 2005. Following is my config.ini file:

[general]
debug = 0
db.adapter = PDO_MSSQL
db.params.host = localhost
db.params.username = user
db.params.password = passwd
db.params.dbname = my_db
db.params.port = 1433
db.params.pdoType = mssql
date_default_timezone = "Europe/London"
logFiles.error = "../var/logs/ApplicationErrors.txt"

[live : general]

[dev : general]
debug = 1
logFiles.error = "php://output"

[test : general]
db.params.dbname = places_test


It gave me some timeout error.
Then I replaced old ntwdblib.dll with newer version.
This time it gave the following error:

Error: SQLSTATE[HY000]: General error: 10007 Incorrect syntax near ')'. [10007] (severity 5) [(null)]

Plz help

Kunal
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-14-2008, 01:44 AM
Junior Member
 
Join Date: Oct 2008
Posts: 1
Default

has this issue been resolved? i think i have the same case as Kunal.

I'm running zend framework 1.6 on php 5.2.6 and apache 2.2.9 and I would like to use sql server2005 for our database.

and i also get the same error message as Kunal's.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-16-2008, 04:46 AM
Senior Member
 
Join Date: Jun 2008
Location: Florida
Posts: 108
Default

Post the script containing the code that is generating the error. I use SQL Server 2005 successfully. The main thing I had to figure out between 2000 and 2005 were view permissions on database metadata, though that's not the case here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-23-2008, 07:20 AM
pcl pcl is offline
Junior Member
 
Join Date: Oct 2008
Posts: 5
Default

Hi,

I have exactly the same problem.

Here is the last part of the stack trace:

#0 C:\www\site\library\Zend\Db\Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\www\site\TrackIt\library\Zend\Db\Adapter\Abstra ct.php(430): Zend_Db_Statement->execute(Array)
#2 C:\www\site\www\TrackIt\library\Zend\Db\Adapter\Pd o\Abstract.php(220): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select), Array)
#3 C:\www\site\projects\www\TrackIt\library\Zend\Db\T able\Abstract.php(1189):


I'm enabling the php_pdo_mssql.dll in php.ini

Last edited by pcl : 10-23-2008 at 07:29 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-23-2008, 09:03 AM
pcl pcl is offline
Junior Member
 
Join Date: Oct 2008
Posts: 5
Default

Hi,

After much debugging in the library code I solved the problem on my environment.

My problem was the fetchAll() of the table class. I was calling fetchAll('1') which translated to 'SELECT * FROM Table WHERE (1)' which generates and error in SQL Analyzer of course. I removed the '1' from fetchAll() and now it works. Hope it will help someone else..

Pieter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:36 AM.