|
NRTFTree - A class library for RTF processing in C#[^]
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)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi All,
I have asked this question twice already in the last hour but for what ever reason I was not able to locate my posts so here I go again. I would like to create a windows app in C# that will insert data from a text file into a table. What can I use to create my table if I'm not creating a web doc? Is it possible to read text file into a record set using C#? I did some research on this topic and only found solutions created in VB5 an VB6. Thank you in advance for your reply.
modified on Saturday, June 26, 2010 1:26 AM
|
|
|
|
|
You might find some clues here[^]. The article addresses the problem of reading text (in csv form) into a recordset. You could then use your recordset to populate a datagrid. If your text file isn't in csv format, look into parsing functions to separate the text into whatever format you need.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
ASPnoob wrote: I was not able to locate my posts
Just go to your home page (see the link at the top of the page with your user name) and click on messages.
It's time for a new signature.
|
|
|
|
|
I checked for him - they weren't there. I suspect he may have posted at the time the site changed over.
"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
|
|
|
|
|
OK thanks. It's just that I've seen this question more than once recently so I assumed (from his userid) that he really was new to the site.
It's time for a new signature.
|
|
|
|
|
i need a very simple chat application can any one help me
to get the basic idea i dont want a complex code
must be simple to understand
|
|
|
|
|
Google!
Try just three words from your question: "simple chat application" and you will get more than 2,000,000 links. Lazy, lazy, lazy...
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
OriginalGriff wrote: Lazy, lazy, lazy...
That doesn't seem fair. Would you read 2,000,000 web pages? Besides, he already started, see the next thread.
|
|
|
|
|
Sorry.
I must remember that nobody wants to read these days.
When I got started, we would have killed for access to 2 web pages worth of info, never mind 2,000,000. We had to go to a bookshop and pay for info! And then read 2,000,000 pages to find the bit we wanted.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
OriginalGriff wrote: We had to go to a bookshop and pay for info!
And that worked rather well. Of course the universe was a bit smaller then; all of VAX/VMS fitted on a single book shelf, and all of Mac OS in 7 volumes. Nowadays one gets millions of references, all overlapping and contradicting each other.
|
|
|
|
|
This must be one of the most common questions in these forums; all asked by people who never seem to have heard of this[^].
It's time for a new signature.
|
|
|
|
|
|
Here are two general points:
1. Create one database installed on server
2. Develop application / chat form which you will get last inserted message from users
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
public Boolean valid()
{
for (int i=0; i < cmbSampleName.Items.Count; i++)
{
if (txtSampleName.Text == cmbSampleName.Items[i].ToString())
{
return true;
break;
}
else
{
return false;
}
}
}
i want to check weather the current text in textbox is present in combobox or not
plz help
|
|
|
|
|
Your code makes no sense, you're only checking the first item.
Also, you're not returning anything if there are no items in the combobox, which is why you have a compile error.
Maybe this is what you wanted? (warning: untested!)
public bool IsValid()
{
for (int i = 0; i < cmbSampleName.Items.Count; i++)
{
if (txtSampleName.Text == cmbSampleName.Items[i].ToString())
return true;
}
return false;
}
|
|
|
|
|
I suggest stepping through it with the debugger and paying attention to what it does.
If you cannot do that, then trace through the code manually setting i to 0 and considering both cases where if is true and where it is false. Then ask what happens if i is 1 - can it get there?.
Here's a clue - it will not reach the break line.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
He won't be able to step through it as the code won't compile.
"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
|
|
|
|
|
That's why I suggested a manual trace - but do people get taught how to that these days?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
riced wrote: but do people get taught how to that these days?
Well the course I did tried to. Of course they went to the other extreme and got us to design the application fully on paper and then set up test and run through manually and document the results, only once we had proved that the design worked as expected could we actually program it. I suppose it's good practice for simple programs (which was the case), to grasp the concept. But for most things it's usually quicker to design a more rough idea of what should be happening, code it and then debug the little problems.
So in short, yes people do get taught that these days.
My current favourite quote is: Punch them in the face, see what happens!
-SK Genius
|
|
|
|
|
SK Genius wrote: it's usually quicker to design a more rough idea of what should be happening, code it and then debug the little problems
Isn't this the essence of Test Driven Development?
"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 may thing that you've got them all covered, but there's a big condition that you haven't checked. What happens if cmbSampleName.Items.Count is 0? The for loop won't execute, so a code path is causing you a problem. What you could do, is rewrite this by removing return false and place it outside the scope of the for loop (i.e. before the final }).
This turns your method into:
public bool Valid()
{
for (int i=0; i < cmbSampleName.Items.Count; i++)
{
if (txtSampleName.Text == cmbSampleName.Items[i].ToString())
return true;
}
return false;
} Alternatively, you could use the Find method on cmbSampleName.Items to find out if the name is present or not (if it returns null, it's not present).
"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
|
|
|
|
|
Just to add the above:
Member 4081808 wrote: return true;
break;
Won't compile either: unreachable code - the "break" will never be executed as the method returns before it.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
lol thats wrong -> compile would succeed..
but bring up a warining as you described
xyz
|
|
|
|
|
You mean you don't have "treat all warnings as errors" enabled?
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|