Skip to Content.
Sympa Menu

freetds - timestamps - a Stamping Problem? (Bus Error)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Karl Pielorz <kpielorz AT tdx.co.uk>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: timestamps - a Stamping Problem? (Bus Error)
  • Date: Tue, 25 Apr 2000 15:50:30 +0100


Hi All,

I'm running a cvs version of FreeTDS with PHP 3.0.16 and PHP4, running against
a MS SQL Server V7, in 4.2 mode.

Recently, we've got data on both the MS SQL server, and on a local MySQL
Database. We need to keep the two in 'sync'.

I can't use "this record has changed" flags on the MS SQL server (as the
triggers needed to ensure their set on 'updates' would also set the flag when
the system tries to update the row (catch-22)?

So, I thought I'd use 'timestamp' columns... MS SQL has these... MySQL has
these... They appear to be completely different formats (Hey, and I thought it
was only DateTime's that thad that problem? :)

The bigger problem, if I run (from PHP for example):

$qTemp = sybase_select( "SELECT * FROM sys_conf" );
if( $qTemp == false ){
echo( "SQL call failed.\n" ); exit();
}
if( sybase_num_rows( $qTemp ) == 0 ){
echo( "Failed to retrieve details.\n" ); exit();
}
$rTemp = sybase_fetch_row( $qTemp ) // <---- Bang! - "Bus error"

Where sys_conf is:

CREATE TABLE sys_conf (
conf_id INT AUTO INCREMENT,
conf_timestamp TIMESTAMP,
conf_name VARCHAR(255),
conf_system VARCHAR(16) );

This seems to make both PHP3 and PHP4 'Bus Error'? - They don't error at the
point of running the query - only when fetching the result set row...

So, it's the actual "fetch result row" that causes it to die... Which makes me
wonder nasty things about whether FreeTDS actually supports "TIMESTAMP" column
types?

If not, can any kind soul suggest another way out? (I've looked at DATETIME
column types, but the format Thunking needed between MySQL and SQL Server 7 is
a bit 'long winded'?) - mind you, from the look of MS SQL v7 TIMESTAMP field
types, it might be the way I'm going to be heading?

Thanks for any info,

Regards,

Karl Pielorz




Archive powered by MHonArc 2.6.24.

Top of Page