|
Hi,
I've got an issue with NHibernate and it's causing me all sorts of headaches. I have a routine which takes an object and manipulates it into an appropriate state, then supposedly writes it to a database. What I'm seeing is that when I run SQL Profiler against the database, all the inserts and updates I'm expecting are present, but when I go to look at the database itself, the data has not been updated. Anyone ever experienced this? If I go back to Profiler and copy and paste the SQL into Enterprise Manager, then run it, everything happens as expected, the records are created/updated and everything looks fine. Profiler does not give any indication that anything went wrong with the transaction and I'm struggling to see what's going wrong. How can Profiler claim that the data has been written when it manifestly hasn't?
If anyone's got any ideas I'd be really grateful.
|
|
|
|
|
Ignore me. In fact, don't ignore me, let me serve as an instructional example. Don't forget that NHibernate is going to do some funky stuff with transactions, and if any of your database operations fail, chances are they're all going to fail. Furthermore, you probably won't get to know about it through conventional means either.
|
|
|
|
|
First class reply Is there an article about NHibernate gotchas lurking in your experiences?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
If I get to the end of this project with some hair remaining and my sanity intact then possibly
I'm still having issues with this actually. Everything I see in SQL Profiler now runs fine if I copy it and run it manually, so I don't know where the rollback is coming from. I'm currently wondering if we can just give the users a fancy looking frontend and ask them to write all the important data down somewhere...
|
|
|
|
|
Hi friends,
In C#.NET, in order to verify whether a file exists and take the required action, we use this piece of code:
if (File.Exists(@"D:/whatsup.txt"))
{
}
Similarly, what will be the code to confirm the existence of a particular drive, say E://, in the system?
Your help will be greatly appreciated,
Rajdeep.NET
|
|
|
|
|
Hi,
Read up on System.IO.DriveInfo
Alan.
|
|
|
|
|
Use:
Directory.Exists(@"p:\"); <- true/false
|
|
|
|
|
Hi,
I'm new to Drawing in c#, i want to draw a simple "line chart" (plot).
I have some values (1,3,4,2) and the time when values were taken (10:00, 12:00, 15:00, 21:00).
I want to represent that 2 lists into a chart but don't know how.
|
|
|
|
|
|
I forgot to say that I'm using Visual Studio 2005 with Microsoft .NET Framework 2.0
In a WindowsForm Application i've used ReportViewer and works fine.
Now I want to do a chart for a Windows Mobile Application, but there i can't use ReportViewer.
Any ideea for drawing chart on a Windows Mobile 6.0 Application?
|
|
|
|
|
Ahh...Sorry, I don't really know much about windows mobile. The MSDN page (below) about the graphics class does say that it's supported on the compact framework, so you could go with that. But it's not exactly simple, you will have to draw every line manually. It might be worth looking around for a chart control that is specifically for the compact framework. (Googling around I can see a few, you'll have to evaluate them and see if any meet your requirements)
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx[^]
Simon
|
|
|
|
|
Hi, I've created a wpf application and i want to create a setup project. I want to use ClickOnce. My problem is how do I use update location considering the fact that i use sql ce database and I don't want changes to affect it. Also, how do I create a certificate in order to not expire after 1 year?
Thank you
|
|
|
|
|
netDeveloper wrote: how do I create a certificate in order to not expire after 1 year?
Check out the renewcert tool. It allows you to renew your cert when it expires. I think it also allows you to specify a longer expiry so you don't have to renew it every year.
http://may.be/renewcert/[^]
netDeveloper wrote: My problem is how do I use update location considering the fact that i use sql ce database and I don't want changes to affect it.
I don't quite understand this question. You specify a location that the app will check updates for. if you make updates that require database changes to a local database you will have to provide that new database with the clickonce update. If you have a local database provided with the app and you need to update it and provide a migration of data from the old copy to the new copy it's probably a bit beyond the scope of click once installation, you should probably be looking at doing a proper client based installation project. Perhaps I've misunderstood your question.
Simon
|
|
|
|
|
I was saying that when i send her a new install that contains updates, it should not modify the local database. I found a solution: modify database name after install(when running application) and use that one. When a new install is applied, it doesn't touch the database, even if i set to uninstall first. I will implement changes to database by hand if needed.
Thank you very much
|
|
|
|
|
Ahh... I see what you are trying to do.
I think you could also just set the database file to "not included" when you publish the update.
Simon
|
|
|
|
|
And that won't delete the old database?
|
|
|
|
|
Not sure. Don't think so. Try it first is the best thing to do.
Simon
|
|
|
|
|
hello all
,i am using the function Dataset.Merge(table, false, MissingSchemaAction.Ignore), to merge larg amount of table ..about 40 tables,the problem appear when some tables have large number of recordes...hence the performance become sooooooo bad,it take about 6...7 m to complete merging for that table to that data set...so does anyone know how to enhance the performance for it ??
or if there is any workaround ??
|
|
|
|
|
So you have taken a dodgy bit of technology (dataset, data processing) designed at best for small volume jobs (2-3 tables and limited rows) and beaten it to death with 40 tables and large volumes of data. I beleive you should move all this processing to a database and reload the data after doing the work in the database.
Secondly I think your design is a disaster looking for a home, anyone loading 40 tables into 1 dataset is asking for trouble. I don't know the design spec for datasets but I have never considered loading more than 3 (small) tables and have NEVER used .merge!
I can feel a rewrite coming your way!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
it is a large system and we have to do that,anyway even in case you just have a one table but it contain alot of records ...the performance will not be acceptable,so have you solution for that ??
but just to enhance its performance but not in the database ??
|
|
|
|
|
Sorry, as far as I'm concerned you are using the wrong tool for the job. This is a design issue NOT a performance issue. If you take a small car and hook up a 5 tonne trailer, you can't complain about the performance, you need a bigger engine and thats the database.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks alot for your replay ,
but the problem i need that before commit it in database,as the data mergerd come from UI and some threads....,so it cannot be handel in Data base...but in case i implement that function ,do you think it may diffrent in performance,??
|
|
|
|
|
Hi
i have seen a desktop application which run via http request on the browser. for example user write a url (problabely location of the application in server) in his/her browser and then press enter, the application run in client machine from network (but app is not installed in client machine, only .net framework has been installed in client machine)
how to do this ?
Thanks
|
|
|
|
|
Have a look at ClickOnce.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
hdv212 wrote: (but app is not installed in client machine, only .net framework has been installed in client machine)
If it runs outside of the browser, then it might have been wrapped as a Remote Application[^]. I believe that VMWare does something similar.
If it runs within the browser, then it's probably an ActiveX control. Those get installed in the browser itself, depending on your security settings.
So, two possible options, but no ready-to-go solutions. If it were easy to do, then everybody would simply run their WinForms-app over the internet
I are troll
|
|
|
|