|
Ok. I remove the piece of code
King Regards!
countNazgul
|
|
|
|
|
Do U Check To See if The Data (file in your case)
was received Successfully and Fully??
there are lots of events and Methods in (MySql/ODBC/OLEDB/SQLserverDataAdapter)
Like the FillError Event
Have Fun
Never forget it
|
|
|
|
|
Yes file was OK.
But i find another solution that extract my files without a problem.
Here is and the code:
MySqlConnection Conn = new MySqlConnection("SERVER=localhost;" +
"DATABASE=db;" +
"UID=user;" +
"PASSWORD=root;");
MySqlCommand Cmd = new MySqlCommand("Select * From test where id = 19", Conn);
Cmd.CommandType = CommandType.Text;
Conn.Open();
MySqlDataReader Reader = Cmd.ExecuteReader(CommandBehavior.CloseConnection);
FileStream FStream = null;
BinaryWriter BWriter = null;
byte[] Binary = null;
const int ChunkSize = 100;
int SizeToWrite = 0;
MemoryStream MStream = null;
while (Reader.Read())
{
FStream = new FileStream(@"c:\Data\Nomenclature123.xls", FileMode.OpenOrCreate, FileAccess.Write);
BWriter = new BinaryWriter(FStream);
Binary = (Reader["blobdata"]) as byte[];
SizeToWrite = ChunkSize;
MStream = new MemoryStream(Binary);
for (int i = 0; i < Binary.GetUpperBound(0) - 1; i = i + ChunkSize)
{
if (i + ChunkSize >= Binary.Length) SizeToWrite = Binary.Length - i;
byte[] Chunk = new byte[SizeToWrite];
MStream.Read(Chunk, 0, SizeToWrite);
BWriter.Write(Chunk);
BWriter.Flush();
}
BWriter.Close();
FStream.Close();
}
FStream.Dispose();
Thank You gays for responses!
King Regards!
countNazgul
|
|
|
|
|
countnazgul wrote: Thank You gays for responses!
I'm straight, thank you.
|
|
|
|
|
I've been at this for a week now and i've only managed to connect to an open sharepoint site (public), but when it comes down to connecting to a password-protected site it becomes a pain and I can neither find nor get any methods to work without exceptions. Any help?
Thanks mates!
-Kevin
Sharp Business Systems
|
|
|
|
|
How to Print a windows form using C# 2008.
The form is just like an Id Card.
How to do that. could you help me.
|
|
|
|
|
|
|
i'm working with DGV and found a little problem that is DGV losses selection when it get clicked before releasing the mouse button, e.g. i have selected 5 rows and if i click on a already selected row then other selected rows get unselected before releasing the mouse button, what i want is, when i click on a already selected row then other selected rows should be keep selected until i release the mouse button like ListView, is there anyway to accomplish this task ?
thanks
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
You are holding down the Control key when selecting?
|
|
|
|
|
no, ok once try it on ListView, i exactly want that, in LV focus do not loss from other selected items until mouse button release
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
At present I have a filesystemwatcher which monitors a folder for the activities of files in that folder.
Now I would like to monitor other folders too.
Can the filesystemwatcher monitor several folders at the same time?
Thanks
|
|
|
|
|
only if all folders are subfolders of the selected folder or drive
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
I want to implement the Linked list, hash table functionality in .NET without using the collection classes, assuming they are not present.How Can I achieve this?
Regards,
Srinu
|
|
|
|
|
srinivas0099 wrote: How Can I achieve this?
Buy a book on algorithms...
|
|
|
|
|
O sorry, wasnt my previous answer sufficient? Would you like me to write all the code for you?
|
|
|
|
|
Thank you for your reply Leppie
if you have sample code then only....
other wise give me some reference books name..
I am very thank full if you provide me the code..
Regards,
Srinu
|
|
|
|
|
srinivas0099 wrote: if you have sample code then only....
No I dont.
srinivas0099 wrote: other wise give me some reference books name..
Google: Data structure and Algorithms in C#. It's not hard. I know there are at least 3 sites that will provide you all the code. But the first step for you is to try and do it yourself. We dont spoonfeed. If you have a specific problem, we will help.
|
|
|
|
|
|
|
How could they not be present ? Under what bizarre circumstance do you expect only half the .NET library to be installed ?
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
What is CS education except reinventing the wheel.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
It's clearly a homework question.
|
|
|
|
|
there is a table in database, having feild StationName & pk as stationID.
Now i am adding the StationName in chekedlistBox control and also using stationID in Tag property for each item i add.
after this what i want to do if a user check 1 or more item from list, then all those items deleted/updated(whatever function i want to perform) ona button click.
I am doing this as:
a) On form load event populating the CheckedListBox control.
b) On Button click event performing my action.
IEnumerator myEnum = chkList.CheckedIndices.GetEnumerator();
string SQL;
while(myEnum.MoveNext() != false)
{
SQL = "Update A Set [xyz] = 1 where [stationID] =" chkList.Tag.Tostring();
ExecuteSQL(SQL);
}
the tag property is not giving the corresponding stationID for stationName.
What is wrong?
Also how to use foreach loop for chekedListBox items?
|
|
|
|
|
humdumof wrote: What is wrong?
humdumof wrote: SQL = "Update A Set [xyz] = 1 where [stationID] =" chkList.Tag.Tostring();//sample query
You need a + to concatenate strings.
|
|
|
|