|
Here is some google foo[^] to help you do some research into your lack of understanding
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi All,
I am _occasionally_ (inconsistently) getting "Attempt to write to read only database" problems with System.Data.SQLite. Googling this issue brings up lots of pages talking about file/folder permission issues (especially with web servers).
I have a Windows Forms App and no web server is involved. Additionally, this problem happens inconsistently (like with every 20 Inserts) and I've got my database in %APPDATA%\MyApp folder (where %APPDATA% is set to the ...AppData\Roaming folder on my data drive). I have no reason to suspect a file/folder permissions problem.
I added a delay to each Insert and I observe that the number of, and likelihood of getting a "Attempt to write..." error is directly related to the length of the delay - a delay of 1 second after each Insert seems to *almost* completely relieve the problem.
Do I have a misconfiguration problem? Searching the net shows lots of positive comments for the stability and correctness of System.Data.SQLite and no solutions suggested except for file permissions config, but my system behaves like SQLite is tripping over itself. There are no other file operations (outside of the OS activity) happening at the same time. I'm out of ideas - help!
I'm using C# vs2008 (I think it's .net 3.5). It was a Win7 box but now it's a Win8 box (no difference for this issue).
|
|
|
|
|
A long shot; but do you have any indexes defined in there that it might try to update[^]?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thx for the reply. No, I did not explicitly add any indexes (indices?). I just did a "CREATE TABLE..." and followed it up with Inserts and Selects. The Selects work fine. The Inserts don't.
I'll take a look with that ANALYSE command that you reference.
|
|
|
|
|
OK I ran the ANALYZE statement but it doesn't show anything. Any other ideas?
|
|
|
|
|
Did you ever get to the bottom of this? I've just started seeing the same behavior on an app that has been stable for years. Really odd.
|
|
|
|
|
Does anyone know where the positions of desktop shortuts are stored? Let's say I have a desktop shortcut and I move its icon to another position on the desktop. It's position is stored somewhere because the icon is obviously restored when you reboot. I tried searching the registry for a uniquely named shortcut I added but I can't find it listed. Perhaps they're stored in a file somewhere?
Right now, this isn't a coding question as such but it may become so if the positions are strored in some arcane place that might need some equally arcane assembly to be used to get them. I figure this kind of information might need a dll import to be added? If it's easy to find I should be ok reading what I need but if it's a tricky bitch to find then, of course, a heads-up will be appreciated.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
In HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop
The format is a little arcane.
|
|
|
|
|
The data is binary and stored in HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop. The position data is in the "ItemPos..." values. A binary stream is saved for each screen resolution and monitor seperately. The format of this data is not documented anywhere publicly.
The desktop icons positioning data in the running instance of Windows is managed by a ListView. No, don't even think of trying get the .NET ListView control to parse the data for you as it won't work.
The process of pulling this off is quite complicated and not well understood. You can read more about an unfinished attempt to do this here[^].
|
|
|
|
|
|
SledgeHammer01 wrote: It's not? I found it rather easily
It's been a long time since I last looked for that stuff. My definition of "documented" is a bit different than yours. I'm saying it's not "officially" documented by MS. What you linked to is a research project that attempts to reverse engineer the data.
|
|
|
|
|
Guys, I appreciate the links and information. It all seems a lot of work for what I thought was a simple thing to achieve. It seems it's anything but!
I'll mull it over and see if the effort involved is proportionate to what I wanted to do.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
|
WidmarkRob wrote: Can this random class work with an array of characters going 100% across the
console window
You're going to have to expound on that a bit to get any kind of a reasonable answer.
What do you mean by "an array of characters going 100% across the console window"??
|
|
|
|
|
let's start with trying to make a console window open in full screen.
I tried using the method SetWindowSize(100%);
I get a, Invalid Expression ')'
|
|
|
|
|
|
Cookie for the obvious one!
|
|
|
|
|
Of course you do, in c# 100% isn't valid. 100%3 returns 1 because % is the modulus operator and 100 MOD 3 = 1. The compiler is reading 100% "100 MOD", then it is missing the second operand, so it throws the invalid expression.
SetWindowSize takes two arguments anyway[^], the number of [character] columns and the number of [character] rows, so there is no way this line could work.
|
|
|
|
|
Nevermind, I did a little bit of looking around online… I guess, ever since XP… You can't create a fullscreen console window anymore without using Pinvoke…
That's a little too much trouble to go through, I'm a newbie/hobbyist C# programmer… I'll just use a Windows form for my project, thanks for the input…
|
|
|
|
|
If I was you,
I would build a solution and inside that solution I would place 3 projects.. maybe more.
1, DLL - where all your business logic lives.
2, Console Application
3, Windows Application.
Both Project 2 and 3 will ref the main dll, or main dlls for their logic so you can have all your
logic inside the dlls and then project 1 and 2 will just serve as the application interfaces.
Should solve the problem without adding to much extra complications..
Then your users will simple have two apps.. one windows mode, and one cmd line..
each app will run the same code pretty much.
You can go even further by inheriting the base dll, and then adding your own 2 or 3 spec code to them.
Good luck!
=)
|
|
|
|
|
I do this:
Console.SetWindowPosition ( 0 , 0 ) ;
int h = Console.LargestWindowHeight + HeightAdjustment ;
Console.WindowHeight = h ;
int w = Console.LargestWindowWidth + WidthAdjustment ;
Console.WindowWidth = Console.BufferWidth = w ;
I find that a HeightAdjustment of -4 and a WidthAdjustment of -1 work fairly well.
|
|
|
|
|
The one has nothing to do with the other. How are you intending to populate the characters?
|
|
|
|
|
Hi,
Is there a way for select multiple pdf area with mouse and get it's coordinates using c#?
Thank you in advance
|
|
|
|
|
You have all the mouse events available to you, you would need to have a way of defining the location and size of the PDF, then you do it with a couple of clicks, top/left and bottom/right. That would define the area withing the already defined document area.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
Eventually, I did
I used Adobe PDF Reader object in the form itself (axAcroPDF).
I open the pdf file in this object.
and then I create the MouseUp, MouseDown and MouseDrag event.
It only can detects outer layer of the pdf object.
It could not detect the pdf inside..
That's why i want to get some advise,
is there any alternative.
Thanks
|
|
|
|