Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Maraya Michael <maraya-michael AT dol.gov>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: RE: timestamps - a Stamping Problem? (Bus Error)
  • Date: Tue, 25 Apr 2000 10:57:06 -0400


Karl,

I'm not sure if 4.2 mode supports this but you can put IF UPDATE
(column1) OR UPDATE (column2) ... in the declaration of your trigger so that
your update trigger is only fired by the columns you want checked. HTH.

.\\

----------
From: Karl Pielorz[SMTP:kpielorz AT tdx.co.uk]
Sent: Tuesday, April 25, 2000 10:50 AM
To: TDS Development Group
Subject: [freetds] timestamps - a Stamping Problem? (Bus Error)

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

---
You are currently subscribed to freetds as: maraya-michael AT dol.gov
To unsubscribe, forward this message to
$subst('Email.Unsub')





Archive powered by MHonArc 2.6.24.

Top of Page