I have some C++ code that is working in Real-Time with a decoder. Its job is to Insert into SQL 2008 R2 and its currently using ADO 2.8 to do it.
However i dont want it to block while doing the Insert, because it holds up other packets arriving from the decoder. So i am trying to convert it to perform its calls Asynchronously so i can blindly Insert my packets which will be faster. Although depending on the speed, it is possible that i may need to Insert a 2nd packet before the 1st one had finished.
I have written some sample code in C# (ADO.NET) and proved that Async mode works, but i cannot get any sample code (ADO 2.8) to work in Async mode in C++ and it is driving me nuts!! I want to use the ExecuteComplete event but that does not fire either?
Please would somebody help me find out what the heck i need to do make some progress on making Async work?
I've been asked to rewrite a 16-bit xBase application (it was last copyrighted in 2003) such that it will run on (at least) Windows 7 32-bit. As I understand it, xBase is more than just a repository for the data; it's also a language of sorts. Is there some sort of silver bullet available that would convert the whole thing to something current, thus requiring no real rewrite?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
I suspect you're up the creek for any UI stuff - it was a quirky 80x25 text-based "forms" front end. If you're only concerned with the backend database, check out Codebase[^]. I've used it to drag an old dBase4 app (kicking and screaming) into Win32 land. No database migration required. Compile their library source with your 32bit weapon of choice and slip it in behind your business/UI layers.
AFAIK Peter is right, your UI is up for a rewrite and rightly so. Your database should be converted to something current and I am betting only the table structure will be transportable. You may need to fiddle with the drivers to get a valid connection, we had to use the FoxPro drivers on the last xbase app we moved.
Never underestimate the power of human stupidity
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Hi can someone help me to solve a foreign key constraint problem? I’m using using Web Developer 2010 Express with mvc3. When my view loads I can create an object by clicking on the Create button but on the edit page, I click on save button and get an error message: That says my UPDATE statement conflicted with the FOREIGN KEY constraint giving the tables relationship and the column.
Here’s what I’ve tried so far: I researched and found that this error is a bug in SQL Server 7.0. but I'm using Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1
I found another tip that suggested that the id field in the main table is perhaps being called before the id fields of the associated table(s) was created. I tried changing the order by seeding all the other tables with data before my main table in my DBInitializer class. I also changed the order in my DBContext class… same error. Finally I decided to change the relationship directly in the database. I removed the relationship and created a new one (had to add fields in the main table to match the number of columns in the associated table). Nothing worked. I then removed the SetInitializer line from my Global.asax and created all tables from scratch directly in the database and as I created them, I found that I had to add data to the associated tables before adding stuff to my main table which seems to support an earlier suggestion but I still got the error message.
I then changed my SetInitializer back to seed the tables still got the same error. I have no problems when I click the “Create” button, only “Save” on the Edit page.
I am running a report in SQL SERVER 2008 that I inherited from a past co-worker in another state. The code is accessing two different servers, but SQl Server management studio seems to be only recongzing only one server/database/table at a time. Is it possible to access two servers while running one report in SSMS/ Below is the server names and databases:
ELMO.[HBS Patient Information].dbo.ECS_Plan_Information E (NoLock)
(Getting invalid oblect name when I hover over this)
Here is a strange result that I am getting with Oracle. Unless I wrap the select from TABLE1 as shown (specifying "rownum > 0"), the query never seems to complete. However, when it is included, it only takes a second or two.
It doesn't make any sense to me, because all that it seems to do is force Oracle to evaluate the nested select with the alias "a" before performing the join. I had thought that placing it in parenthesis would do that automatically. Perhaps the Oracle optimizer does something wonky that this compensates for..? Scratching my head here, because all that the "where" condition adds is basically saying "give me any rows that you find".
select COUNTRY_NAME, count(*) TALLY from
select * from (
select IP_SOURCE_NUM from TABLE1
where log_date between'01-JAN-2012'anddate'01-FEB-2012'and IP_SOURCE_NUM > 0
) where rownum > 0
JOIN ip_geo b on b.ip_from =
select max(ip_from) as ip_from_match from ip_geo
where ip_from <= a.IP_SOURCE_NUM
orderby count(*) desc
As you already realized yourself, the paranthesis doesn't define in which order the query is executed, only what data the result is built from.
But by specifying Rownum > 0 you're forcing the optimizer to change the order of execution.
But I would use an optimizer hint instead. Like Select /* +materialize */ * from...