5.5.00 to 5.5.04 Update Problem

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I'm getting database error "-157 Cannot convert SQLDATETIME to a date"
after updating my SQL Anywhere from 5.5.00 to 5.5.04.&nbsp; The error only
ocurred after updating to 5.5.04 and goes away if I go back to 5.5.00.
The error is the result of an embedded SQL statement in which the timestamp
is in the WHERE clause of a SELECT statement. Any ideas?</html>

0
Jerry
2/26/1999 2:23:53 PM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

3 Replies
677 Views

Similar Articles

[PageSpeed] 4

Can you post some DDL and DML to reproduce this with?
-- 
Jim Egan [TeamPS]
Dynamic Data Solutions, Inc. http://www.dyn-data.com
Houston, TX

                ***********************************************************
                          Enterprise Applications in Your Future?
                      JumpStart '99 Enterprise Solutions Conference
                                http://www.JumpStart99.com
                ***********************************************************

0
jegan
2/27/1999 3:20:59 AM
This is a multi-part message in MIME format.
--------------87A306848A183B14DC906CAC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I've attached an SQL script to build the table and another file which contains
the SQL functions being used. The SQL functions have been extracted from a
couple of different libararies and combined together for your convenience. I
hope they compile for you. The problem occurred with the SQL OPEN function. I
hope this is the type of information your lookin for.

Jim Egan wrote:

> Can you post some DDL and DML to reproduce this with?
> --
> Jim Egan [TeamPS]
> Dynamic Data Solutions, Inc. http://www.dyn-data.com
> Houston, TX
>
>                 ***********************************************************
>                           Enterprise Applications in Your Future?
>                       JumpStart '99 Enterprise Solutions Conference
>                                 http://www.JumpStart99.com
>                 ***********************************************************

--------------87A306848A183B14DC906CAC
Content-Type: text/plain; charset=us-ascii;
 name="timeout.sqc"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="timeout.sqc"

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

#include <sqldef.h>

EXEC SQL INCLUDE SQLCA;
EXEC SQL INCLUDE SQLDA;

EXEC SQL BEGIN DECLARE SECTION;
  static int
    sPlcId,
    sSequenceNo,
    sTransactionNo,
    sSecondaryTransactionNo;
  static SQLDATETIME
    sTimeDate,
    sTimeout;
  static char
    sProcessName[21],
    sPlcDriver[21];
  static DECL_BINARY(244)
    sMsgLog;
EXEC SQL END DECLARE SECTION;


/******************************************************************************
 * void WsqlMakeSqlDateTime -
 *
 * Args:  
 *
 * Return:  
 *****************************************************************************/
void WsqlMakeSqlDateTime(SQLDATETIME *sqlDate, time_t t)
{
  struct tm
    *tm;

  memset(sqlDate, 0, sizeof(SQLDATETIME));

  if ((t == 0) || (t == NO_SQL_DATE))
  {
    sqlDate->year=1;  /* Setup the Year so the db doesn't complain */
  }
  else
  {
    tm = localtime(&t);

    if (tm != NULL)
    {

      sqlDate->year = (unsigned short)(tm->tm_year + 1900);
      sqlDate->month = (char)tm->tm_mon;
      sqlDate->day = (char)tm->tm_mday;
      sqlDate->hour = (char)tm->tm_hour;
      sqlDate->minute = (char)tm->tm_min;
      sqlDate->second = (char)tm->tm_sec;
    }
  }
} /* end WsqlMakeSqlDateTime() */

/******************************************************************************
 * Sint WsqlOpenPlcTransLogTimeouts -
 *  opens the PLC transaction log cursor looking for transactions that are
 *  timed out.
 *
 * Args:  
 *
 * Return:  
 *****************************************************************************/
Sint WsqlOpenPlcTransLogTimeouts(SQLCA *lSqlca, time_t timeDate,
                                 char *processName, char *callingFunction)
{
EXEC SQL BEGIN DECLARE SECTION;
  SQLDATETIME
    ignoreTimeout;
EXEC SQL END DECLARE SECTION;

  if(lSqlca)
    db_set_sqlca(lSqlca);

  strcpy(sProcessName, processName);
  WsqlMakeSqlDateTime(&sTimeout, timeDate);
  WsqlMakeSqlDateTime(&ignoreTimeout, 0);

  SQLCODE = 0;

  EXEC SQL DECLARE PlcTransLogTimeoutsCursor CURSOR FOR
    SELECT
      plcId,
      sequenceNo,
      transactionNo,
      secondaryTransactionNo,
      processName,
      plcDriver,
      timeDate,
      timeout,
      msgLog
    FROM PlcTransactionLog
    WHERE Timeout <= :sTimeout
      AND Timeout != :ignoreTimeout
      AND ProcessName = :sProcessName
    ORDER BY Timeout;

  if(SQLCODE)
  {
/*
    if(callingFunction)
      WsqlDbError(sqlcaptr, callingFunction,
         "WsqlOpenPlcTransLogTimeouts DECLARE");
  */  
    return FAILURE;
  }

  EXEC SQL OPEN PlcTransLogTimeoutsCursor
    WITH HOLD;

  if(SQLCODE)
  {
/*
    if(callingFunction)
      WsqlDbError(sqlcaptr, callingFunction,
         "WsqlOpenPlcTransLogTimeouts OPEN");
  */  
    return FAILURE;
  }
  
  return SUCCESS;
}

--------------87A306848A183B14DC906CAC
Content-Type: text/plain; charset=us-ascii;
 name="plcTransactionLog.sql"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="plcTransactionLog.sql"

DROP TABLE PlcTransactionLog;

CREATE TABLE PlcTransactionLog
(
  plcId                   int,
  sequenceNo              int,
  transactionNo           int,
  secondaryTransactionNo  int,
  processName             char(21),
  plcDriver               char(21),
  timeDate                timestamp,
  timeout                 timestamp,
  msgLog                  binary(244),
  primary key (plcId, sequenceNo, processName, plcDriver)
);

CREATE UNIQUE INDEX PlcTransLogIdx ON PlcTransactionLog (transactionNo, processName);

--------------87A306848A183B14DC906CAC--

0
Jerry
3/1/1999 2:07:31 PM
I'm sorry, but you have sent me code that I can't do much with.  I don't 
do C/C++.
-- 
Jim Egan [TeamPS]
Dynamic Data Solutions, Inc. http://www.dyn-data.com
Houston, TX

                ***********************************************************
                          Enterprise Applications in Your Future?
                      JumpStart '99 Enterprise Solutions Conference
                                http://www.JumpStart99.com
                ***********************************************************

0
jegan
3/2/1999 2:23:49 AM
Reply:

Similar Artilces:

Moving from 5.5.00 to 5.5.04
All, We are making the move from 5.5.00 to 5.5.04 build # 1888 (A little late but making it none the less). We have been running 5.5.00 from inception and have been plagued by the missing primary key row problem as well as some passthrough problems. We have made some PASSTHROUGH changes to the current publications. To be safe, I am planning on removing all pubs and subscribers at each of the consolidated sights and redoing same after upgrading to 1888. Is there anything special I should do with respect to the consolidated database (Upgrade utility, etc) to ensure I get the best possi...

Upgrading from 5.5.00 to 5.5.04
Greetings everyone I currently have the dubious honour of looking into upgrading our 5.5.00 database to 5.5.04 (the comments I have read in this ng regarding ASA 6 lead me to believe that a greater leap is too dangerous at this time). Our only previous experience of upgrading the database was a move from 5.0.02 to 5.5.00 which resulted in breaking our accounting module leading to numerous fixes and costly retesting. The breakages were mainly due to behavioural changes of the ODBC driver (e.g. in stored procs - not using the result clause for the column names and types for backward ...

5.5.03 or 5.5.04??
I hope this has not been asked to death? But I will be upgrading our test system from 5.5.02 build 1495 to either 5.5.03 or 5.5.04. First is there anything in 03 that is not included in 04? Second, are there any known problems with 04? I'll listen to facts, rumors, opinions, etc. TIA Shannon 5.5.04 seems pretty stable. -- Terry Black HCIA, Inc. e-mail:tblac@hcia.com Shannon Griffith wrote in message ... >I hope this has not been asked to death? But I will be upgrading our test >system from 5.5.02 build 1495 to either 5.5.03 or 5.5.04. First is there >a...

5.5.03 OR 5.5.04 ?
I've just installed the 5.5.04 maint release. On opening my database (created in 5.5), its properties state that the version is 5.5.03. As many have no doubt upgraded to 5.5.04, could someone pls advise if this is 'correct' behaviour? Many thanks in advance -- MAX HUGEN Hugen Enterprises Pty Ltd Email: maxhugen@ozemail.com.au Tel: +612 9560 3061 Fax: +612 9564 5073 >I've just installed the 5.5.04 maint release. On opening my database >(created in 5.5), its properties state that the version is 5.5.03. >As many have no doubt upgraded to 5.5.04, could...

Run 5.5.00 + 5.5.04 on same server?
Is it possible to run two separate engines of different versions on the same server? I have a customer that has a third party application running 5.5.00 on Novell Netware. My application has been tested under 5.5.04. The customer would like each app to run under their recommended configurations, so he's looking at running 2 instances of the database engine NLM, one for the third party app and the second for our app. Is this possible, and if so, are there any issues with the engine being of different versions (they would be installed to a separate directory on the Novell server, ...

Problem shifting from 5.5.04 to 5.5.05
Hi, I'm not sure I've picked the right newsgroup, but anyway I have the following problem: I use ADO to access the database. Whenever I needed a new entry I used to do: recordset.Open( SELECT * FROM AnyName WHERE ID = -1 ) which opened an empty recordset cause there's never an ID -1 recordset.AddNew recordset: set some values recordset.Update this used to work with Sybase SQL Anywhere 5.5.04. Now I've changed to 5.5.05 and this doesn't work no more. The Update doesn't fail, but still nothing goes to the database. If I open the recordset with a command t...

Upgrading 5.5.5 to 6.5.5
I am going to be upgrading from GW 5.5.5 to GW6.5.5 Anybody aware of any gotcha's or have any advice? LauraB@itdynamics.co.za wrote: > I am going to be upgrading from GW 5.5.5 to GW6.5.5 Anybody aware of > any gotcha's or have any advice? Not really. Before you upgrade rebuilt the post offices and domains or do at least a validate of the databases. If you are not really experienced I recommend to purchase the caledonia upgrade guide. -- Cheers, Edward ...

upgrade 5.5.04 to 5.5.05
I have build 1982 of 5.5.04 installed and tried to install 5.5.05 over this since there were a lot of bug-fixes. After installation had finished I notised that the installation had not replaced any files. I suspect the reason is that build 1982 of 5.5.04 has newer date (sep. 7. 99) than 5.5.05 (july 22. 99). What is the best version for me to use? If 5.5.05. is the best version, how should i upgrade? Thanks in advance, Lars Yes this is true - we look at file dates Please backup your software, then install 5.5.04 off your CD, then install 5.5.05 patch Lars Inge ...

Upgrade 5.5.5 to 6.5
I'm wondering if I can upgrade my whole backend (MTA & POA's) and then gradually (pick and choose) which clients I want to switch over to the new 6.5 client. Can I do this ? Caledonia's "GW 6.5 Upgrade Guide" says yes, but to watch out for 1) the renamed Sent Items folder and 2) D109 errors opening mail. Has anyone got the #2) error and is it very prominent ? David Schryer SOLGEN You can. The D109 error can happen from time to time. -- Timothy Leerhoff Principal Consultant Independant Experts Novell Support Forums Volenteer Sys...

Upgrade to 5.4.5 or 5.5
Hi, Currently we are running eBiz version 5.4.2.5 under Winodw2000. We are having cluster died issue since the beginning. Now we are planning to move to 5.4.6 or 5.5. Would someone help me to share if there are any serious issues with new versions (for windows)? Should we go with Win2000 or Win2003. Thanks Aftab Aftab,.. Our advise for this moment is to run impact 5.4.6. under Win2003. (See also your earlier replay on Carl's post) We do have some problems with startin a cluster from a earlier ersion of impact. The cluster won't start always correct or won't...

ODBC error on upgrade of 5.5.00 to 5.5.04 or Y2K patch
Dear all, We have inhereted some software from a company that went bust. We are trying to implement Y2K fixes on the software for all their existing customers. When we upgrade the database from 5.5.00 to 5.5.04 we get the following ODBC message on a Select Statement: Run-time error '-2147217900(80040e14) [Sybase][ODBC Driver]Syntax error:near 'case' in...CaseRefNumber FROM [case] WHERE ID = '235' This message occurs when the following SELECT statment is passed. This happens both in our VC++ product with ODBC and also the later VB programs using ADO (ho...

SQLAnywhere 5.5.04ebf(1868), 5.5.05
Hello! I have recieved message from "owner-inews-tech-sqlanywhere@sybase.com" with Subject "Delphi users". Where can I obtain new ebf(s)? I found only 5.5.03 in the Software library. (http://support.sybase.com/esd/sqlany.html) ==== Subject: Bug Fix / Enhancement (PTrack 479443) - .... Summary: Delphi can't insert Blobs > 32k - SQLBindParameter only inserted the first 32k of a given buffer. Versions affected: 5.5.x Versions fixed: 5.5.04ebf(1868), 5.5.05 P4 change number: 52135, 52298 Modules affected: wod50 .... === You'll have to contact Tech ...

Patching SQLA 5.5.01 to 5.5.04
Patched all clients and remote sites to 5.5.04, and replication sometimes halts on the Netware server running 5.5.01. So I need to patch it right? Okay, How! I d/l the patches for server and Replication but am not getting anywhere with them: I can't get the setup.exe to point to the Netware system files area as it asks. No matter what I enter as the path it will insist on deleting c:\sqlany50\win32! Making no mention of a Netware area--not even in the setup file. Help. Andre. d/l: https://support.sybase.com/software/tools/sqlany/maintfls/v5504/netware/nwse5504.zip and ...

Migration from 5.5.04 to 5.5.05 on Netware
Hi! Could I run into trouble in the following scenario: We have an app that uses 5.5.04. The server used to be 5.5.04, too. Now the client has updated Netware to version 5 and the server crashes. I've been told to upgrade to 5.5.05 EBF. Question: Are there any known problems using an app with 5.5.04 on a Netware server with 5.5.05? Regards, Heinz You must get an EBF from Tech Support to run 5.5.04 on Netware 5. Or you could save yourself the trouble and just download 5.5.05 which will run on Netware 5 without any EBF. -- Jim Egan [TeamSybase] Houston, TX Sybas...

Web resources about - 5.5.00 to 5.5.04 Update Problem - sybase.sqlanywhere.general

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

The problem with the RBA's terms-of-trade forecasts
Most commodity markets have proved too reactionary to offer much insight into future price developments.

6 problems with the Moto X Play and how to fix them
... every other smartphone and tablet out there, the Moto X Play is not without its issues. Which is why, we've rounded up some of the common problems ...

Apple is working on an iOS app for troubleshooting device problems
... with knowledge of goings-on at Apple’s Infinite Loop HQ,” the in-development application asks customers “basic questions to boil down the problem” ...

Sleeping in on weekends linked to health problems
... morning snoozes (however glorious they may be). Sleeping late on days-off—and other sleep-time adjustments—are linked to metabolic problems ...

DeAndre Hopkins Having No Problem with Darrelle Revis, Burns Him for 61-Yard TD - Bleacher Report
Many believed Houston Texans wide receiver DeAndre Hopkins would be stranded on Revis Island this Sunday. He hasn’t been—at all...

This is not just some oddity from Ottawa: Yoga really is a cultural appropriation problem.
Here 's a story from Canada. At the University of Ottawa, the Centre for Students with Disabilities has decided to end its program of free yoga ...

Oil Patch Problems: Rigs Down 60%, Production Down 3%, $40-$50 Price Doesn't Work
... has not hand a monthly close below $40 since mid-2004. And $40 to $50 is not even profitable, putting producers into a bind. Oil Patch Problems ...

E. Coli Isn't Chipotle's Only Problem
Brand perception was way down even before the latest outbreak.

Yahoo's board suddenly has a big, looming problem and it could mean the end of Marissa Mayer
... winnable for Starboard. And with the Alibaba stake looking more risky, this argument is potentially worth fighting harder for. The IRS problem ...

Resources last updated: 11/23/2015 3:17:41 PM