|
Right. But from the looks of things, your code needs to be cleaned up a bit more.
First of all, you're trying to execute the same SQL command twice. Was this the intent? (I don't think so.)
You're reading it once here...
MySqlDataAdapter.SelectCommand = New SqlClient.SqlCommand(sSQL,conSQL)
MySqlDataAdapter.Fill(MyDataSet)
And the other here...
MySqlCommand.ExecuteReader
I think you should get rid of the Adapter and DataSet and stick to MySqlCommand since I didn't see your code really using them anyways. Also, you need to dispose MySqlCommand and its DataReader once you're done using them. Not doing so would cause a database connection "leak" (for a database like Access, there are only a finite number of connections that can be made so this is important). Dispose them before you dispose the connection.
[edit]
Oops. I just noticed that you are closing the DataReader. You just need to dispose the MySqlCommand then.
[/edit]
-- modified at 15:04 Wednesday 26th October, 2005
|
|
|
|
|
that's great ..
thank u for ur support
|
|
|
|
|
Hi,
I need a hand. What I need to do is to read a word from a file (this I can do). Then I need to get my program to remove all duplicates from the word. After that I need to load that into a string of textboxes and then to add the alphabet starting from the last letter of the word.
e.g
1. Load the word mememe
2. Strip the duplicates so the final word would be me
3. Insert into textboxes and add alphabet e.g mefghijklnopqrstuvwxyzabcd
Thanks in advance
Stevelam
|
|
|
|
|
Steve...
You didn't specify in the specs whether or not the removal of duplicate letters, and the appending of the alphabet was to be case sensitive. The functions I wrote are both case sensitive.
Download this Visual Studio project from my web site.
http://www.2goodsoftware.com/snippets/duplicate letters.zip
When you run the project in VS, type any string into the textbox and click the button (neither control is appropriately named or initialized since the project is just a test bed). The modified string will be displayed in a message box.
There are two functions ... RemoveDupLetters and AddAlphabet. Copy both functions and paste them into a module (for global scope) in your project.
If I can be of further help, please let me know.
George
|
|
|
|
|
Thats great, thanks. The only problem is the fact that if I put in hello it gives me helopqrstuvwxyz but really I could do with helopqrstuvwxyzacbdfgijkmn
Thanks again for the quick responce.
Steve
|
|
|
|
|
I though the idea was to remove duplicate letters ... as in the second L in hello? Mayhe I missed something. Anyway, your welcome.
|
|
|
|
|
Sorrry I should have said that I needed the whole alphabet in the end, just that it started after the last letter and didnt have any duplicates. Hope you can help. Thanks once again.
Steve
-- modified at 14:35 Wednesday 26th October, 2005
|
|
|
|
|
Steve...
The plot thickens. To ensure that I fully understand what the specs are, please reply with the entire string you expect to get when you enter "hello".
|
|
|
|
|
hellow to all ..
i had read the following artical
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnword2k2/html/odc_wdoverride.asp
on how to overide a command in office word and other office programs ..
but there are plenty of things that i didn't understand ...
like , where do i put Subroutines ?
and how the Override.exe file is related to all this ...
i will be thankful if can anybody help ...
thank's
byebye
-- modified at 5:42 Wednesday 26th October, 2005
|
|
|
|
|
hi,
i m using data grid...how it is possible that data grid does not display null if database does not have value for that perticular column.
i need to print datagrid,
its very urgent please help me.
|
|
|
|
|
Me.columnname.NullText = ""
|
|
|
|
|
i don't know much abt crystal report.i have installed vb.net.as i know with that it'll automatically install crystal report.but every time when i open vb.net it's telling that crystal report should register.
although i have seperate crystal report setup and serial.(have not installed.because it,s there with vb.net)
just i wrote a simple program to use crystal.it was ok.working
but it's telling your crystal report key has expaired.
i have these questions?pls anyone can help me
* how to enter unlock code for crystal report with .net
* if we have registered copy, ones we install system in a machine which have no crystal report what we should we do to work report
* will that also expired
* if i install frame work, will it only be enough to work crystal with machine thats doesn't have .net and crystal report installed
pls help me
amilapradeep2004@yahoo.com
amilapradeep@gmail.com
sri lanka
|
|
|
|
|
Why don't you install the seperate CR version you have there ?
amila pradeep wrote: if i install frame work, will it only be enough to work crystal with machine thats doesn't have .net and crystal report installed
I doubt it. You should try it and see. I'd have expected the compiler to copy whatever you need into the bin dir though.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks
if i copy dll where should i copy those
|
|
|
|
|
It depends. Windows/System32 will work, but in theory, we're supposed to put dlls in the same dir as our app in .NET, which will also work.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
u mean i have to install crystal report on client machine, who is going to use my application.
|
|
|
|
|
amila pradeep wrote: u mean i have to install crystal report on client machine, who is going to use my application.
Yes - how do you expect the program to work if you don't install all the required components on the client machine?
You'll need to check the licencing conditions for Crystal to see if what you want to do is kosha or if you need to buy additional licenses.
...Steve
|
|
|
|
|
|
i don't know much abt crystal report.i have installed vb.net.as i know with that it'll automatically install crystal report.but every time when i open vb.net it's telling that crystal report should register.
although i have seperate crystal report setup and serial.(have not installed.because it,s there with vb.net)
just i wrote a simple program to use crystal.it was ok.working
but it's telling your crystal report key has expaired.
i have these questions?pls anyone can help me
* how to enter unlock code for crystal report with .net
* if we have registered copy, ones we install system in a machine which have no crystal report what we should we do to work report
* will that also expired
* if i install frame work, will it only be enough to work crystal with machine thats doesn't have .net and crystal report installed
pls help me
amilapradeep2004@yahoo.com
amilapradeep@gm
|
|
|
|
|
hi there,
i'm new to vb and i'm having problems formatting decimal values...
instead of displaying 0.26, my decimal points appear as commas(,) like this: 0,26
Can somebody please help me..
-- modified at 0:29 Wednesday 26th October, 2005
|
|
|
|
|
In some countries, they have a comma there, and dots for thousands, as in 1.000,00. Weird, I know, but in this multicultural world...
Speaking of which, your PC obviously believes it's in a locale where such a thing would be normal, and expected. If it's not, then check your timezone settings, etc.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, well there are a few ways to get by...
dim decValue as Decimal
decvalue = format(yourvalue, "#.##0.00")
use this example to return the value as 0.25
for more decimal points, add more 0
the yourvalue, is the value you want to convert
hope this help
Arno
|
|
|
|
|
Hi,
Somebody help me what code for this.
I have the illustration of my text file below. All under <b>123 </b>contains the value of <b>a,b,c,d </b>and <b>456</b>, contains the value of <b>e,f,g,h</b>. I use mid fuction to read each line but my problem is how can I code that <b>b,c,d</b> is still under <b>123</b> and <b>f,g,h</b> is still under 456?
The purpose of my program is to get the center and its coressponding Account and Amount.
Appreciate your quick response. Thanks in advance.
Illustration of my text file.....
Center Account Amount1 Amount2
123 a xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
b xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
c xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
d xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
456 e xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
f xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
g xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
h xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
-- modified at 23:00 Tuesday 25th October, 2005
|
|
|
|
|
blums wrote: I use mid fuction to read each line
A regex wouild serve you better, IMO
blums wrote: I use mid fuction to read each line but my problem is how can I code that b,c,d is still under 123 and f,g,h is still under 456?
You're trying to get the letters to line up ? Try using tabs instead of spaces, perhaps ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
blums...
Can you email me your text file so I can see the file instead of a representation of it?
Thanks ... George
|
|
|
|