I am almost crazy now after playing with these codes
over 10 hours.
I don't expect to call sybase_query() one by one for
executing sql batch. It just doesn't work for me like
what I said yesterday. Now I try to make a stored
procedure for these sql batch. So I can call
sybase_query() only once. But sometimes it works and
sometimes not, it depends on what is in the stored
procedure. And I am sure that every stored procedure I
put into sybase_query() can be run on SQL Server
Query Analyzer perfectly.
e.g.
SP1: (works)
CREATE PROCEDURE SP1 AS
insert into mytable values(...)
select * from mytable
SP2: (doesn't work)
CREATE PROCEDURE SP2 AS
select * from mytable
select * from mytable
SP3: (doesn't work)
CREATE PROCEDURE SP3 AS
insert into mytable values(...)
insert into mytable values(...)
It looks that the sybase_query() is not stable. I am
not the person doing freetds setup on this Unix
machine. Do you think this is a freetds related
problem?
--- olinux o [EMAIL PROTECTED] wrote:
test
--- jong jong [EMAIL PROTECTED] wrote:
Hi,
I am working on Unix(Solaris 2.8) with Apache 1.3
and
php4. I need to connect MS-SQL Server without
ODBC.
Someone told me that sybase functions can work
with
MS-SQL Server. So I called sybase_xxx()
instead of mssql_xxx(). I was surprised that most
of
them really work! But the problem is that
sybase_query() seems only work for select ...
statement. When I tried to pass
insert...,update... or delete..., this
function
returned false, but the database was actually
updated. And the following sybase_query() would
always
return false even it is for select
Here is an example:
$conn=sybase_connect(MS-SQL
Server,login,password); //successful
sybase_select_db(db,$conn); //return true
$result=@sybase_query(select ...,$conn);
//Great!
That's what I want.
sybase_free_result($result); //no problem so far
$result=@sybase_query(insert ...,$conn);
//return
false, but I did insert a new record into SQL
Server.
sybase_free_result($result); //successful
$result=@sybase_query(select...,$conn); //return
false, can't work with select... any more.
...
Anybody had same experience before? I will
appriecate
any information from you.
Wen
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
To contact the list administrators, e-mail:
[EMAIL PROTECTED]
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]