|
Like other have said, unless you're really experienced with SQL, you should use parameters (and even if you are really experienced, it's still a good idea).
The first problem is you appear to be using the wrong data type to store bytes. VARBINARY is a character type to store binary strings (useful for forcing case sensitivity, IE, 'a'='A' in a char type, but not a binary type) - http://dev.mysql.com/doc/refman/5.1/en/binary-varbinary.html[^] You probably wanted a BLOB type of some kind.
As for storing byte[] with an SQL statement, converting the bytes into a hexadecimal string value should work -
INSERT INTO (FileID, Data) VALUES (1, 0x0F2EAA32);
|
|
|
|
|
|
How i can disable Intrupt in Critical Section?
please guid me
|
|
|
|
|
Even if you manage to do that (which you won't, you'd need to execute cli in ring 0, how to do plan to do that?) you would completely break windows. Not good.
Why do you think you need to do this?
|
|
|
|
|
harold aptroot wrote: Why do you think you need to do this?
To dream the impossible dream
To fight the unbeatable foe
To bear with unbearable sorrow
To run where the brave dare not go
To right the unrightable wrong
To love pure and chaste from afar
To try when your arms are too weary
To reach the unreachable star
This is my quest
To follow that star
No matter how hopeless
No matter how far
"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
|
|
|
|
|
is that really you, Pete O'?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
'tis I. It seemed appropriate (and I just heard it on a Honda ad).
"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
|
|
|
|
|
you'd better explain why you want to do this, and what it is you want to achieve. There may be better ways.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
The correct answer is {EA2E30B3-5AC2-400e-91D7-72E353F0760D}. He asked you to guid him.
"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
|
|
|
|
|
Now I have a guiding problem, your codes throw a BadArgumentException.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
My client application and server application runs on two different machines (client app is a WinForm and server app a WCF service). In the client app, the user needs to point out a location on the server [e.g. D:\SomeFolder or C:\SomeFolder\SomeOtherFolder]. These are not shared folders.
The best way would be if I could show a FolderBrowserDialog on the client displaying the server's Desktop, local drives, mapped drives etc. just like it would display those items from the local machine.
I've been stuck with this for a couple of days now, unable to find a good solution, so I thought I'd check if anyone here knows how this could be achieved. In a desperate attempt I even tried to let the service return a FolderBrowserDialog (created on the server) and then called the .ShowDialog() method on the client side - but that only showed the local Desktop, drives, folders etc..
Does anyone have any good pointers? I could of course have the server return its drives and when the user selects a drive show the folders and then when the user picks a folder show that folder's subfolders and so on, but before I do I want to check if there is an easier way (why reinvent the wheel, right?).
|
|
|
|
|
I'm just gonna write my own. It won't take too long
|
|
|
|
|
Pls i have a win app, i wan to make it start running as windows starts.
how do i do it.
thanks
|
|
|
|
|
put a shortcut in the current users "..\Start Menu\Programs\Startup" folder.
|
|
|
|
|
You can make your program to be launched automatically by Windows at start-up using registry. See here[^] for additional information.
Another option is adding your application to: Start->[All] Programs->Startup sub menu (C:\Documents and Settings\All Users\Start Menu\Programs\Startup).
|
|
|
|
|
Make it a Windows Service (though it would then have no UI).
Run it as a Windows Scheduled Task.
|
|
|
|
|
I have raw metal sheets of various rectangular sizes (x1*y1, x2*y2,
... xn*yn).I want select best fit sheet which fullfill my requirement for getting new sheets of X*Y it also has some tolerence.
e.g
I have metals sheets like 200*100,300*200,250*500,50*100,100*100
and I Require 3 pieces of 100*100 with 3mm tolerence.so how do I find the best fit soluion and how do I implement this logic.
Thanks in advance.
|
|
|
|
|
please stop cross posting - you posted it in algorithms, which is probably more correct - posting it here as well wont get you a solution any faster
'g'
|
|
|
|
|
i am developing a Desktop Application in c# where user have to give username and password to login. This application runs when windows starts. Now user have to give password for login to windows and then again the have to login in my application. My question is is there any option to get the login credential so that user have to login once for windows and my application?
Thanks in advance.
|
|
|
|
|
You are saying that the user logging into Windows is, by default, the same one logging into your application at start-up? So why bother logging them in at all? Assume it is the same user and start your application. Unless you have another reason for tracking who is logged in to your application?
Then you could use one of these or similar:
Environment.UserName
System.Windows.Forms.SystemInformation.UserName
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
one user can logout at any time from Application without loogin off from windows. and other user have to login into the application before the use the particular machine. so i have to keep separate user database form my application.
|
|
|
|
|
montosen wrote: one user can logout at any time from Application without loogin off from windows
Then there's absolutely no way to use the current windows login info for anything beyond retrieving the currently logged-in user. If anothger user can come along and start using apps on another user's logon credentials, the app MUST ask for user ID and password.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
yeha! i guess ur right.
|
|
|
|
|
You could check to see if the currently logged-in user is part of a particular group, and if so, just let them use the program. Otherwise, make them enter a password.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|