Migrating dates from SQL Anywhere to MS SQL Server

I have just tried do add MS SQL Server 7 to the list of
the databases supported by my PB/SQL Anywhere 
application and here is my problem: 

What do I have to do in MS SQL 7 to be able to use the SQL
Anywhere 'date' data type? 

I don't want to rewrite my app and convert all dates to the 
datetimes because I have hundreds of them on literally
hundreds of datawindows.

SQL Anywhere has the 'date' data type. 
MS SQL 7 has 'datetime' which corresponds to the
'date' but you cannot just create a MS SQL user-defined
'date' type and map it to the 'datetime'. It does not work
in the sense that you have garbage in your datawindow date 
edit fields (question marks and other stuff). MS SQL
migration wizard converts SQL Anywhere 'date' fields
to MS SQL 'smalldatetime' which also does not work
at all with datawindows. 

I am STUNNED that MS provides no easy path to migrate 
PB apps from Sybase databases to MS SQL Server.

What am I missing here?

Andrzej

0
Andrzej
10/28/2002 5:53:29 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

3 Replies
892 Views

Similar Articles

[PageSpeed] 51
Get it on Google Play
Get it on Apple App Store

If all your datawindows created using SQLAnywhere, you can connect to MS
SQLServer and Oracle without any modification, make sure to include
staticbind=0 into dbparm of the connection string.

But if you have embedded SQL to select any date data from the database...
then you will hit the problem.  You have to either convert it into
datawindow or write a wrapper function to convert from datetime to date.

Hope that help
Kevin

"Andrzej D Zaleski" <gmsaxz@friko7.onet.pl> wrote in message
news:01c27ea6$76468840$e900000a@ania.gazeta.pl...
>
> I have just tried do add MS SQL Server 7 to the list of
> the databases supported by my PB/SQL Anywhere
> application and here is my problem:
>
> What do I have to do in MS SQL 7 to be able to use the SQL
> Anywhere 'date' data type?
>
> I don't want to rewrite my app and convert all dates to the
> datetimes because I have hundreds of them on literally
> hundreds of datawindows.
>
> SQL Anywhere has the 'date' data type.
> MS SQL 7 has 'datetime' which corresponds to the
> 'date' but you cannot just create a MS SQL user-defined
> 'date' type and map it to the 'datetime'. It does not work
> in the sense that you have garbage in your datawindow date
> edit fields (question marks and other stuff). MS SQL
> migration wizard converts SQL Anywhere 'date' fields
> to MS SQL 'smalldatetime' which also does not work
> at all with datawindows.
>
> I am STUNNED that MS provides no easy path to migrate
> PB apps from Sybase databases to MS SQL Server.
>
> What am I missing here?
>
> Andrzej
>


0
kdinh
10/28/2002 8:17:03 PM
Ok. everything is fine!

I changed MS SQL Server driver from ODBC (supplied by MS)
to native PB and everything works smoothly. I created
a user defined data type 'date' of type 'datetime' on
MS SQL Server 7, changed CREATE TABLE syntax
for identity fields from 'DEFAULT autoincrement' to
'IDENTITY' and seems like that's all that
is needed. No need to change datawindows or anything.

BTW US Justice Dept. should have a closer look into the
MS SQL Server ODBC driver. It does not work with PB -
datetime fields seem to be all messed up. I think I know
why:-) 

0
Andrzej
10/28/2002 11:32:12 PM
You need to switch to OLE DB, MS no longer supports ODBC or the native 
driver. Make sure you are on PB8 and you should probably upgrade to MS SQL 
2000. OLE DB, PB8 and MS SQL 2K work very well together.
0
SB
10/29/2002 3:57:11 PM
Reply:

Similar Artilces:

MS SQL Server and SQL Anywhere Server
Hi! I would like to get information about differences in database's for MS SQL Server and SQL Anywhere Server. I have project in S-Designor - database for ASA Sybase. I would like to change ASA database project to fix MS SQL Server (I would like to minimalize costs). One difference I know: table name in MS SQL Server must be shorter than in ASA (I don't remember how long). Does anyone know more differences ? Thank in advance Joanna ...

MS SQL Server and SQL Anywhere Server
Hi! I would like to get information about differences in database's for MS SQL Server and SQL Anywhere Server. I have project in S-Designor - database for ASA Sybase. I would like to change ASA database project to fix MS SQL Server (I would like to minimalize costs). One difference I know: table name in MS SQL Server must be shorter than in ASA (I don't remember how long). Does anyone know more differences ? Thank in advance Joanna Johanna, Be careful with the ASA timestamp data type. Its MSS equivalent is datatime, not the MSS timestamp which is something complet...

MS Access SQL migration to MS SQL Server TSQL
got some MS Access SQL Code that needs converting into TSQL: SELECT dbo_qryMyServices.FormsServiceID, dbo_qryMyServices.ServiceName, Sum(IIf(IsNull([CompletionDate]),0,1)) AS Completed, Count([pkServiceID])-Sum(IIf(IsNull([CompletionDate]),0,1)) AS Uncompleted, Count(dbo_MyServiceRequests.pkServiceID) AS TotalCount FROM dbo_qryMyServices LEFT JOIN dbo_MyServiceRequests ON dbo_qryMyServices.FormsServiceID = dbo_MyServiceRequests.PostType GROUP BY dbo_qryMyServices.FormsServiceID, dbo_qryMyServices.ServiceName ORDER BY dbo_qryMyServices.ServiceName; because it's Access and got V...

SQL Anywhere to MS SQL Server
I have a PB 5.0.02 application that has been developed entirely using Sybase SQL Anywhere for the database. We are now planning to switch to using MS SQL Server 6.5. To minimize the amount of work required and potential problems I think that I will just use an ODBC connection instead of the native drivers provided in PB. Are there any problems I should be aware of? Will the SQL fail or behave differently in certain aggregate functions? Any help or advice is greatly appreciated. Thanks in advance. Scott Bray I forgot to mention, I am running SQL Anywhere Authenticated v...

migrating from sql anywhere to sql server
Hello, I'm migrating a powerbuiler application from sql anywhere to sql server and im having a problem with one of the stored procedures. Here is the code from the original (sql anywhere) stored proc: alter procedure postdoc.khes_out_docs() result(loan char(13),borrower char(20),state char(2),source_name char(35),r_w char(2),funding_dt date,grade char(2),doc_id char(8),comment_no integer,comment_x char(75),region char(3),source_cd char(8),reviewer char(8)) begin select ctl_info.loan,ctl_info.mtgr_last,ctl_info.state,ctl_info.source_name, ctl_info.typ_bus_src,ct...

Migrating SQL Server anywhere 5.5.04 to SQL Server 2000
Can anyone help in pointing me in the right direction to find out useful information on migrating a Sybase SQL Anywhere 5.5.04 database to SQL Server 2000. I cannot find any useful information about this ie known problems, processes etc. Thanks Chris wrote: > Can anyone help in pointing me in the right direction to > find out useful information on migrating a Sybase SQL > Anywhere 5.5.04 database to SQL Server 2000. I cannot find > any useful information about this ie known problems, > processes etc. If you already have a solution on SA 5 (now ASA), why are yo...

Adaptive SQL Anywhere and MS SQL Server
Does anyone know how to replicate database from Adaptive SQL Server to Microsoft SQL Server? TIA, Henny You can try a case tool like ErWIN or PowerDesignor. Import all tables, then change target server to MS SQL and generate schema on the MS SQL. HTH, Igor H. Yong <hyong@ocwa.com> wrote in message news:heQ$YbhJ$GA.173@forums.sybase.com... > Does anyone know how to replicate database from Adaptive SQL Server to > Microsoft SQL Server? > > TIA, > Henny > > ...

Transfer from SQL Anywhere to MS SQL Server?
Hello, can anyone give me an idea of how to move from SQL Anywhere v5.0 to MS SQL Server? Cheers Geoff On Mon, 3 Feb 2003 17:35:32 -0500, Ed_Ardzinski wrote: >I'm sure that the majority in this forum as asking "what for?"... :-) Ed, thanks for your reply. The reason why?! A colleague uses a booking system which is based on SQL Anywhere at the moment but the booking system people are suggesting that he moves to MS SQL Server during this year and their costs of transfering the records are very high !! Perhaps with reason? Why isn't is as simpl...

MS SQL Server and SQL Anywhere connectivity
Hello, I am having some problem, we have an application running against MS SQL Server 6.5 as backend. Now we have decided to use SQL Anywhere also as an backend with the application. Problem is that we have coded lots of MS SQL Server specific code in our application so we cannot straight away use the application against SQL anywhere. Can anyone help me in this. Thanks in advance Rajesh Rajesh Dutta wrote: > > Hello, > I am having some problem, we have an application running against > MS SQL Server 6.5 as backend. Now we have decided to use SQL Anywhere ...

MS SQL Server 6.5 to MS SQL Server 2000
We are migrating from MS SQL Server 6.5 to MS SQL Server 2000. We are using a Native connections and would like to know if there are any issues that we should be aware to do this correctly. TIA Adam Shepherd Are you sure about that? I have not experienced (or heard of) that kind of problem w/ 7.0. There are many other reasons why a table san is performed, but I don't think a numeric data type would cause it... Or are you talking about the PB problem of sending an Integer as 1. -- Kim Berghall Sisu Group, Inc. remove no_spam. no_spam.kberghall@sisugrp.com www.sisugrp...

transfer data between SQL anywhere and MS SQL server
Any good, fast, easy method, please suggest. I have 2 identical DB in SQL anywhere and in MS SQL server, which including about 100 table. How can I transfer the data between these 2 DBMS system?? Pipeline is not a good idea, because it can transfer 1 table at 1 time. I don't mind to write a small program to do that, but I do not want hard code the field name in the program because the file structure required to be changed later. Thanks in advance. I do this by creating datawindows dynamically, exporting out the data to text then importing data to the database using the...

How do I migrate a SQL Anywhere database into Microsoft SQL Server?
I received a detached .db file which was from Sybase ASA version 9. I installed the Developer version of SQL Anywhere 11 and used the Unload Database tool to convert it to a version 11 database. I am trying to get the whole thing into SQL Server 2008 (which is what I need to work in) using the Import Wizard. I select the data source "SQL Anywhere OLE DB Provider 11", but I am stuck getting it to actually connect. I read that there may be problems with this driver. Does anyone have any tips on how to copy this database into SQL Server? Thanks in advance for any help! Hi...

Concurrent use of MS SQL Server and SQL Anywhere
Is there any reason to avoid running these two SQL servers concurrently? From what I have found browsing the Internet, there does not seem to be a problem. But I do not wish to create an incompatible combination. Any feedback will be very helpful. Gary, There should not be a software conflict with this configuration, but there will be an obvious hardware resource competition (memory, I/O, CPU, etc.) for this arrangement. Provided the expected workloads aren't too extreme though, this configuration should be fine. Regards, garymc@mcfarlen.com wrote: > Is there ...

How do I migrate a SQL Anywhere database into Microsoft SQL Server?
I got a detached .db file from a client which was from Sybase ASA version 9. I installed the Developer version of SQL Anywhere 11 and used the Unload Database tool to convert it to a version 11 database. I am trying to get the whole thing into SQL Server 2008 (which is what I need to work in) using the Import Wizard. I select the data source "SQL Anywhere OLE DB Provider 11", but I am stuck getting it to actually connect. I read that there may be problems with this driver. Does anyone have any tips on how to copy this database onto SQL Server? Thanks for your help! W...

Web resources about - Migrating dates from SQL Anywhere to MS SQL Server - sybase.powerbuilder.general

Thunderclap Migrating From Twitter to Facebook
Thunderclap, a mass-messaging service that gained popularity on Twitter, has set its sights on Facebook . Twitter recently booted Thunderclap ...

Facebook Migrating Unofficial Page Fans to Official Pages at Brand Owner’s Request
Rupesh Mandal is such an avid fan of the Opera Mini web browser that he set up a Page on Facebook totally devoted to celebrating it, and then ...

YouTube - Evaluating & Migrating to Cloud Storage
Hochgeladen am 31.08.2011 When evaluating cloud storage, no matter the need, there are criteria that must be placed above the rest, including: ...

UAE is the global leader in attracting migrating professionals, study finds
... with 28 per cent, was the leading source of professionals, according to the LinkedIn study. The UAE is the global leader in attracting migrating ...

Enchanting video shows hundreds of stingrays migrating through shallow waters
A video showing hundreds of stingrays migrating through shallow waters&nbsp;has gone viral,&nbsp;months after being uploaded to Facebook.

The krilling season: Whales keep tourists migrating south
Earlybird whale watchers in Eden have been rewarded with astounding acrobatic displays in the bay.

Migrating Swans were bound for glory, says great
Migrating Swans were bound for glory, says great

Researchers say Irukandji jellyfish migrating further south along Qld coast
Researchers say climate change could be altering the migration patterns of the dangerous Irukandji jellyfish along Qld's east coast.

Apple chip supplier TSMC announces record profits, migrating to more advanced technology
... Company , iPhone , and iPad continue reading at 9to5Mac . What do you think? Discuss "Apple chip supplier TSMC announces record profits, migrating ...

More eBay Merchants Migrating to Amazon in Search of Sales Growth
EBay's once-loyal merchants are moving more of their business to Amazon, saying they get more for their money by selling merchandise via the ...

Resources last updated: 1/20/2016 6:25:59 AM