BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL Server 2005 with ODBC/BDE

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Rhea Grason
Guest





PostPosted: Wed Apr 04, 2007 1:36 am    Post subject: SQL Server 2005 with ODBC/BDE Reply with quote



I am converting Sybase SQLAnywhere databases to SQLServer 2005. I still use Delphi 5 and the bde to connect to the Sybase databases. I use cached updates a lot in my apps. I was hoping to quickly convert to SQL Server by just creating an odbc connection to the databases and use that odbc instead of the Sybase one. I have had to convert a few datatypes but basically have few problems until I tried to apply the cached updates. I can view the data, but it hangs when I try to apply cached updates. I have only a short time to convert and am not at all familiar with SQL Server. I have started to convert to ADO but doubt I will have time to complete the conversion by my deadline so was hoping to use odbc until I can completely convert. Is there a problem using cached updates and TUpdateSQL component with SQL Server 2005? Could I use odbc for everything but cached updates until I completely convert? What other options do I have? Thanks!
Back to top
Rhea Grason
Guest





PostPosted: Wed Apr 04, 2007 2:54 am    Post subject: Re: SQL Server 2005 with ODBC/BDE Reply with quote



I currently am using a Sybase database using BDE/ODBC with cached updates for master/detail inserts and updates. I have to switch to SQL Server database and do the same thing. I know I should use ADO components to do that. I have started the conversion but have many, many queries to convert in 4 apps I have written. I don't think I can get it all done by the time they would like to switch to SQL Server. I was hoping to just use odbc to connect to the SQL Server database in place of the Sybase database and have very little else to do to make it work until I can completely convert everything to ADO. I have the data displaying when using odbc with SQL native client for SQL Server 2005, but when I try to do the cached updates the app hangs, as in I have to "end task" or use program reset to end the program, no error message appears.

Quote:
Bill Todd<no (AT) no (DOT) com> 4/3/2007 4:45 PM
Rhea Grason wrote:


Quote:
I have had to convert a few datatypes but basically have few problems
until I tried to apply the cached updates. I can view the data, but
it hangs when I try to apply cached updates.

If I understand you correctly you are reading data from the Sybase
database using BDE/ODBC and performing SQL INSERT statements to insert
the data into SQL Server 2005 also using BDE/ODBC. Is that correct?

When you say that ApplyUpdates hangs I assume you are using cached
updates for the SQL Server connection. If so, the easiest solution is
to not use cached updates. Just use a parameterized INSERT statement to
insert the new records into SQL Server. Cached updates does not provide
any advantage when you are inserting.

What do you mean by "hangs"? Is there an error message?

--
Bill Todd (TeamB)
Back to top
Bill Todd
Guest





PostPosted: Wed Apr 04, 2007 3:45 am    Post subject: Re: SQL Server 2005 with ODBC/BDE Reply with quote



Rhea Grason wrote:

Quote:
I have had to convert a few datatypes but basically have few problems
until I tried to apply the cached updates. I can view the data, but
it hangs when I try to apply cached updates.

If I understand you correctly you are reading data from the Sybase
database using BDE/ODBC and performing SQL INSERT statements to insert
the data into SQL Server 2005 also using BDE/ODBC. Is that correct?

When you say that ApplyUpdates hangs I assume you are using cached
updates for the SQL Server connection. If so, the easiest solution is
to not use cached updates. Just use a parameterized INSERT statement to
insert the new records into SQL Server. Cached updates does not provide
any advantage when you are inserting.

What do you mean by "hangs"? Is there an error message?

--
Bill Todd (TeamB)
Back to top
Bill Todd
Guest





PostPosted: Wed Apr 04, 2007 4:34 am    Post subject: Re: SQL Server 2005 with ODBC/BDE Reply with quote

I thought that you were referring to a data conversion program, not
your production apps. I have no idea why ApplyUpdates would hang with
no error message. This problem may have nothing to do with cached
updates. I would try a simple test app to see if you can insert and
update rows into a single SQL Server 2005 table without using cached
updates but using the same BDE/ODBC connection settings that your
production apps use. If the test fails then there is a more generic
problem with BDE/ODBC/SQL Server 2005 and you may have no choice but to
convert to ADO.

--
Bill Todd (TeamB)
Back to top
Ottar Holstad
Guest





PostPosted: Wed Apr 04, 2007 1:44 pm    Post subject: Re: SQL Server 2005 with ODBC/BDE Reply with quote

Quote:
I am converting Sybase SQLAnywhere databases to SQLServer 2005. I still
use Delphi 5 and the bde to connect to the Sybase databases. I use cached
updates a lot in my apps. I was hoping to quickly convert to SQL Server by
just creating an odbc connection to the databases and use that odbc instead
of the Sybase one.

We (at work) have done the exact same thing - from Sybase ASA to MSSQL. We
use cached updates a few places, and we had no problems converting those to
MSSQL. As far as I can remember i don't think we had to do anything with
regards to cached updates.
Back to top
Rhea Grason
Guest





PostPosted: Wed Apr 04, 2007 8:07 pm    Post subject: Re: SQL Server 2005 with ODBC/BDE Reply with quote

I tried a simple insert and update on a table using the same odbc connection as the one hanging cached updates. It was successful. I didn't make any changes to my code in the one that hangs other than to change the database it uses. I will experiment a little more today and see if I can get it to work. If not I can always convert to ADO for my master/detail tables and leave the rest as is. That would save me a lot of time right now.

Quote:
Bill Todd<no (AT) no (DOT) com> 4/3/2007 5:34 PM
I thought that you were referring to a data conversion program, not

your production apps. I have no idea why ApplyUpdates would hang with
no error message. This problem may have nothing to do with cached
updates. I would try a simple test app to see if you can insert and
update rows into a single SQL Server 2005 table without using cached
updates but using the same BDE/ODBC connection settings that your
production apps use. If the test fails then there is a more generic
problem with BDE/ODBC/SQL Server 2005 and you may have no choice but to
convert to ADO.

--
Bill Todd (TeamB)
Back to top
Rhea Grason
Guest





PostPosted: Thu Apr 05, 2007 8:25 pm    Post subject: Re: SQL Server 2005 with ODBC/BDE Reply with quote

I think I have found the problem. I got some cached updates to work where I am only retrieving the fields from the detail table. In the instance where it is hanging I retrieve other fields from other tables as well in the query, but of course only update the fields in the detail table in the UpdateSQL component. I know I can't do that in ADO components so I am assuming it is the same for the UpdateSQLcompnonet as well when SQL Server is the database. I will change the detail query and try it out in cached updates.

Quote:
Ottar Holstad<no (AT) no (DOT) no> 4/4/2007 2:44 AM
I am converting Sybase SQLAnywhere databases to SQLServer 2005. I still
use Delphi 5 and the bde to connect to the Sybase databases. I use cached
updates a lot in my apps. I was hoping to quickly convert to SQL Server by
just creating an odbc connection to the databases and use that odbc instead
of the Sybase one.

We (at work) have done the exact same thing - from Sybase ASA to MSSQL. We
use cached updates a few places, and we had no problems converting those to
MSSQL. As far as I can remember i don't think we had to do anything with
regards to cached updates.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.