|
TheBeginner77 wrote: used a variable
in Sql Select statement you must put a sign before it like a $
Read this article about SQL injection attacts.
SQL Injection Attacks and Some Tips on How to Prevent Them[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Im not sure if Insert is even the right word in SQL terms, but heres my problem:
I am trying to write files, binary files, into a database using a buffer. I want to add large files into the database in small pieces. I have the code underlying the problem of actually cutting it up. My problem starts when I try to insert it into the database, it just overwrites the previous data instead of appending it.
All help is greatly appriciated!
THANKS!
|
|
|
|
|
It would be very helpful to see the SQL statements you're using.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
Hi,
This is kind of a repost, but not completely.
I want to show a Pitch graph/curve of a wave file. I saw that good results can be made by using AutoCorrelation. I have the autocorrelation function and I also have the FFT function, but I don't know what I should put into the autocorrelation function in order to get a pitch line.
I have a wave file (spoken text), and also have the FFT results of the wave file, how can I extract from this data a nice Pitch curve. The purpose of the pitch line is to show the intonations of the text.
Thanks,
Gidon
|
|
|
|
|
I'm trying to build a simple backup program in C# and want direct disk/partition access to the raw data with longfile name support. I have been looking for documents or source to learn from but I cannot find any. I'm sure I'm just not searching for the right keywords. Can anyone point me in the right direction?
Thanks,
dcoerver
|
|
|
|
|
I'm not absolutly sure what you want because when you're talking about raw access to the disk or a partition you don't have file names.. There is just one big block of data which you have to parse yourself...
However if you just want to read raw data from a partition - it's pretty easy with CreateFile. You can specify this: "\\.\C:" instead of a filename to "open" a partition!
|
|
|
|
|
Can someone show me how to do this in c#?
|
|
|
|
|
hi
in the button_click i wrote these codes :
string src = @"E:\App_Lock\HDCopy.exe";
FileStream finput = new FileStream(src,FileMode.Open);
BinaryReader br = new BinaryReader(finput);
byte[] b = br.ReadBytes((int)finput.Length);
System.AppDomain dom = System.AppDomain.CreateDomain("newDomain");
Assembly assembly = dom.Load(b);//Get Error On this line
assembly.EntryPoint.Invoke(null, null);
but an error occured when i clicked button and show this error :
Additional information: Exception from HRESULT: 0x8013141D
How to solve My problem and run app from byte[]?
|
|
|
|
|
hdv212 wrote: Exception from HRESULT: 0x8013141D
is HD_Copy.exe a Managed C++ mixed-mode assembly? If so, you cant load it from byte[].
|
|
|
|
|
hi
HD_Copy.exe is a setup program and i don't know what is it ..
|
|
|
|
|
How can i make a file(or my code) as a ddl file so that no one can see my code.
Any help please??????????
aLi
|
|
|
|
|
If you mean calling the code, you may mark your code blocks as private or internal, otherwise you mean by diassimlying your code you may use Dotfuscator.
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
to convert you program to DLL :- from the main menu select
Project -> Properties on the properties dialog change the (output type)combobox to (Class Library) then press ok().
Tamimi - Code
|
|
|
|
|
Hello all,
in my WinForms application there are many forms. I want to apply one Icon file for all forms and for EXE also
How to do this
any suggetions are appriciated
regards
GV Ramana
|
|
|
|
|
For forms :
You can make a base class (say class BaseForm:Form)
Set the icon for this class
And inherit all forms in the project from it..This can also help you applying default styles to all your forms.
|
|
|
|
|
And for the exe itself, set its property from the project properties menu.
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
UPDATE: This works correctly when I run the BIN directory executable, but not when I run from the debugger.
I have a table adapter with insert method, for testing I use the following in a button click event:
this.classPhotoNamesTableAdapter.Insert(100, 100, 200, 300, 400, "PICNAME");
this.USNTPSDataSet.ClassPhotoNames.AcceptChanges();
If I click the button twice I get a primary key violation, so its valid, but the row is not inserted into the actual db file. Am I missing something?
I also tried this way with the same results:
SqlConnection dataconnection = new SqlConnection();
dataconnection.ConnectionString = global::....USNTPSConnectionString;
dataconnection.Open();
SqlCommand datacommand = new SqlCommand();
datacommand.Connection = dataconnection;
datacommand.CommandText = "INSERT INTO ClassPhotoNames (class_no, x_lower, y_lower, x_upper, y_upper, pic_name) values (100, 200, 300, 400, 500, 'NAMEFIELD')";
datacommand.ExecuteNonQuery();
dataconnection.Close();
datacommand.Dispose();
dataconnection.Dispose();
-- modified at 16:06 Saturday 3rd June, 2006
|
|
|
|
|
In my application I have two forms (Form1 & Form2).Form1 having button1(btn1).
When click btn1, I show Form2 by creating by instance of Form2.
Form1 still visible now. If Once again I click btn1, I want to prevent the creation of new instance of form2.It should show already opened Form2.
How can i made this?
I am beginner in c#.Please tell me briefly.
|
|
|
|
|
There's no need to post a second thread. The first one you posted is good enough. You just didn't ask your question correctly.
<br />
class Form1 : Form<br />
{<br />
private Form2 myOtherForm = null;<br />
<br />
protected void btn1_OnClick(...)<br />
{<br />
if (this.myOtherForm == null)<br />
this.myOtherForm = new Form2();<br />
this.myOtherForm.Show();<br />
}<br />
<br />
}<br />
That should take care of it.
You could do much more complicated things involving singletons and such, but that's probably overkill.
|
|
|
|
|
Hello. I want to learn that converting an excel chart or table to pdf with iTextSharp.dll is possible or not?
If it is possible which classes I must use?
Is there any example or link that you can recommend?
If anybody help me I will be glad.
Thank you.
Murat
|
|
|
|
|
It is possible but you have to do a lot on your own.. iTextSharp can write tables by using PdfPTable . However there is no class included that reads an excel file and writes a pdf so you also have to use interop or an excel reader class to get the data from excel.... It's not difficult but it takes while I guess!
|
|
|
|
|
In my windows application (C#).
I have a mainform with toolbar control and two additional forms(says subform1,subform2)
when i click toolbarbutton1 subform1 was open.
when i click toolbarbutton2 subform2 was open.
now i have one button in subform2 which is used to rediect the user to the subform1. My requirement is ...,
Instead of create new instance of subform1,i want to use already opened subform1.
give some idea that satisfy my above requirement.
|
|
|
|
|
What does that have to do with threading?
Change the constructor of the subform2 to accept a reference to a form. When you create subform2 you pass along a reference either to the main form or subform1. Subform2 can then use that reference to set focus on subform1 either by accessing a method in the main form that does it or do it itself.
A refence to the main form would be the choise if subform1 doesn't have to be created before subform2 is.
---
b { font-weight: normal; }
|
|
|
|
|
But i dont know how make the refrence to another form.
please tell me briefly.
|
|
|
|
|
To show any form, you do something like:
<br />
MyForm myForm = new MyForm();<br />
The variable myForm is a reference. If you only have one of those, there will only be one form.
|
|
|
|