|
I really have no idea. Do you think you would be able to get it to work and share the code with me?
|
|
|
|
|
Ah I don't know, have you tried looking at what the byte array contains before stringing it? Probably.. but.. what was in it?
|
|
|
|
|
Thanks for all your help. I was able to get the code for a c# hex editor and it helped me figure it out.
|
|
|
|
|
Hi Guys,
I want to insert in a list view all the Table Names from a Oracle DB. I started by learning how from Syed M Hussain 's post :
A Very Simple Oracle Query Tool[^]
<br />
using Oracle.DataAccess.Client;<br />
using Oracle.DataAccess.Types;<br />
.....<br />
static private OracleConnection orcCon;<br />
private static OracleCommand cmd;<br />
private static OracleDataAdapter da;<br />
private static OracleCommandBuilder cb;<br />
private static DataSet ds;<br />
private static String sql;<br />
.....<br />
public static DataTable GetUserTables()<br />
{<br />
sql = "SELECT TABLE_NAME FROM USER_TABLES";<br />
cmd = new OracleCommand(sql, OrcCon);<br />
cmd.CommandType = CommandType.Text;<br />
da = new OracleDataAdapter(cmd);<br />
cb = new OracleCommandBuilder(da);<br />
ds = new DataSet();<br />
da.Fill(ds);<br />
<br />
return ds.Tables[0];<br />
}<br />
...........<br />
dtTable = Code.ConectareOracle.GetUserTables();<br />
for (int i = 0; i < dtTable.Rows.Count; i++)<br />
{<br />
MessageBox.Show(dtTable.Rows[i].ToString());<br />
}<br />
....<br />
..and the error i get is that da.Fill(ds) has : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Any ideea?
Kind regards,
Alex
“Be the change you want to see in the world.”
|
|
|
|
|
use Query
"select * from tab where TABTYPE='TABLE'"
instead of "SELECT TABLE_NAME FROM USER_TABLES"
the problem may be , your user don't have the sufficient previlizes.
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hi all,
I want to Watermark(Overlay) an existing video. I don't want to
capture a new Video . For that I m using DirectShowLib DxText Sample
Application(in C#) for VideoWatermarking on an existing video.
It works fine but it only display the video with watermark as a
preview on screen.
Now I need to save the watermarked video on the disk as a new file.
How can I do this?
Thanks in Advance
|
|
|
|
|
This is no C# question.
You should better read the documentation of the component or ask this question in their forum.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
how can we save exist information in a database table using datagridview with foreach rule?
foreach (DataGridViewRow ro in (dataGridView1.Rows))
{
???????
}
|
|
|
|
|
Why do you want to use the for each loop to do this?
Look for the existing implementations .Net provide to update the database. For eg. dataset.update
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Pliz help me to call another form to display a video command from a different form
|
|
|
|
|
Up at the top of this list of questions is a selection "How to get an answer to your question".
Read it, and try again.
This may explain why you (currently) have 7 votes for "Bad Question", and none for "Good question". It may also explain why you have no replies (other than this, if you are going to be picky)...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Dear members am glad to be a member of this blog.
I would like to pass on my special thanks to all who have helped me to learn how to program in C# .
It is because of you that I learnt how to Design a music player.
Now pliz help me to skin my player. Email:nabende.george@yahooo.com
Those interested in Friendship are highly welcomed.
Am george based in Uganda.
|
|
|
|
|
Firstly, I congratulate you on learning a programming language by teaching yourself, if you have made good strides then that's great.
Secondly, if you posted here, you should be familiar with the rules by now. Start doing something, if you get stuck then post exactly where, don't e vague asking for general help like 'skinning your player'. Don't post your email either, it's an invitation to get spam.
Read the rules again.
Good luck.
|
|
|
|
|
Hi,
How can a suspended thread can abort.
Thankyou
YPKI
|
|
|
|
|
Hi,
According to the documentation and the compiler warnings you must be getting Thread.Suspend is obsolete since .NET 2.0; you should not use it any longer.
FWIW: To abort, you should undo the suspension, hence try Thread.Resume first.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
You could undo it after. See my reply.
|
|
|
|
|
try
{
yourThread.Abort();
}
catch (ThreadStateException e)
{
yourThread.Resume();
}
|
|
|
|
|
for (number=0;primes<10001;number++)
That is a valid for loop.
However, I am trying to parallelize this, and Parallel.For will only accept one delegate.
Therefore, if I wanted
for (number=0;number<10001;number++)
I could do
Parallel.For(0,10001, delegate(int number))
Parallel.For has no overload which accepts two delegates.
What is the Parallel.For equivalent of the first snippet?
Thanks,
Fahad Sadah
|
|
|
|
|
Fahad Sadah wrote: for (number=0;primes<10001;number++)
If primes doesn't change in the body of the loop, why doesn't
Fahad Sadah wrote: Parallel.For(0,10001, delegate(int number))
work?
|
|
|
|
|
It probably does though. Why else would he have asked?
|
|
|
|
|
Well, if it does, the code isn't really parallelizable. If each iteration of the for loop overwrites the variable in a way that is dependent on previous iterations, it doesn't really make sense to parellilize it. For example, if it really is calculation of primes, then numbers = 10000 could run before numbers = 2.
|
|
|
|
|
|
Good question!
The problem you have is that you don't know the bounds of your input - you don't know how big number will have to get to generate the required number of primes .
However, you can still parellelise chunks of work - something like this:
const int N = ( int ) 1e6;
static readonly int STEP = Environment.ProcessorCount * ( int ) 1e6;
...
var primes = new List<int>( N );
for ( int start = 2 ; primes.Count < N ; start += STEP )
primes.AddRange(
Enumerable.Range( start, STEP )
.AsParallel().AsOrdered()
.Where( i => IsPrime( i ) ) );
primes = primes.Take( N ).ToList();
You'll have to tune the values of N and STEP for your specific case.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Hi,
In an application playing number of files from a folder, i need to use slide bar.
How can i implement in my application. I am using 2005 framework.
Thankyou,
YPKI
|
|
|
|
|
What do you want the slidebar to look like, and even more important, what do you want the slide bar to represent?
|
|
|
|