|
Hi All,
I have a question I want to append Value="0" string into a string
as below
Dim str as String
str="<parameters">
str = str + "Value=??????
how should I do it to make it look as below
<parameters value="0" type="Double">
as this. Like I need to use escape character but in VB.Net escape character is " only so pls. give me a sample code snippet how to use it.
Thanks,
Aleem Mohammad
Senior S/W Engineer
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
Double them:
Dim LstrSting As String
LstrSting = "Manas Bhardwaj"
LstrSting = LstrSting + "Value=""0"""
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
Thanks for the answer but if I want to add a variable value with it
Like
Dim name as String = "Sample"
Dim LstrSting As StringLstrSting = "Manas Bhardwaj"
LstrSting = LstrSting + "Value=""0"""
LstrSting=LstrSting + """" + name + """"
how? As I need it should look like the below
<value name="Sample" ----it="" should="" look="" like="" mode="hold">
Thanks,
Aleem Mohammad.
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
Well, your code would work...but just a suggestion, using String.Format is always nice as it makes your code more readable...
Dim LstrSting As String
Dim name As String = "Indian143"
LstrSting = "Manas Bhardwaj"
LstrSting = String.Format("{0}""{1}""", LstrSting, name)
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
indian143 wrote: how should I do it to make it look as below
I don't see anything below.
Use the "Ignore HTML" option when you are posting markup code.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
moonshaddow wrote: but it say that onlt a int32 can fit
Is there a way by which you can wear a infant's pant.
BTW, this is how the RichTextBox has been built. The only workaround is to look for another control which support int64.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
just a simple no would have of done, your first line(Is there a way...) was Inappropriate and unnecessary.
J.Hardy
|
|
|
|
|
moonshaddow wrote: was Inappropriate and unnecessary
Don't be silly, a sarcastic remark is always appreciated (if not by the wearee). At least he did elaborate why and give you an avenue to find a solution.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
a sarcastic remark is always appreciated, not really1!
J.Hardy
|
|
|
|
|
Ah but you are the wearee!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i would be ashamed if i was coders like you, it is you poeple who give coders a bad name
J.Hardy
|
|
|
|
|
J
I'm not a coder. I'm a developer, someone who has a wider view than a coder.
moonshaddow wrote: i would be ashamed if i was coders like you, it is you poeple who give coders a bad name
Where on earth did you get the idea that "coders" have a bad name. Possibly if you are talking about the sweat shop "code from specification" person, but a competant developer commands and usually gets a very high level of respect. Even junior developers in the team I run are respected and appreciated, they work hard and are paid to THINK, they are on their 1st or second job and most of them contribute to this site (hopefully they don't know my pseudonym).
None of them would ask a question like your OP, they would do the research before exposing themselves to the ridicule the question deserves. You need to think about the questions you ask.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
you signature really matches you comment
J.Hardy
|
|
|
|
|
another win for the little poeple!
J.Hardy
|
|
|
|
|
Is it possible to sort by two columns in a listview? Can someone send me a link or sample?
I have a list view that has 4 columns;
Class Code, Class Description, Category Code, Category Description.
Right now it sorts the class code ascending but I want it to sort first by class/category code.
All samples I find that use IComparer are only sorting by a single column.
Thanks,
digicd1
|
|
|
|
|
The control does not support it, I suspect you need to sort your data source and then bind to it, sorted. Or write code to shuffle items yourself.
Oh - what if you just sort by your secondary key, then your primary key ? Wouldn't that work ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
Maybe you could use a dataview and sort/filter your datasource, then get the rows from the sorted/filtered dataview and add them to the listview
Alexei Rodriguez
|
|
|
|
|
I've encountered a messy bug that requires that I use Jet 2.x code rather than Jet 4.0 code that causes the problem.
Here's the situation:
I have to deal with a legacy multi-user application that runs Access 2.0. I need to change some of the Access 2.0 tables from my vb.net application. When I use OLEDB (or even ODBC) and the 4.0 Jet provider the following circumstances happen:
Let's say 2 people are running the legacy Access 2.0 application with the .mdb table I need open (which is the usual running state). The .ldb file for this shows the normal computer name strings and User (admin) in single byte per character format. I open the database with the Jet 4.0 driver in vb.net. All is still well, it adds my computer name and user as the third record in the .ldb file. Now, I close the database from vb.net. Jet 4.0 rewrites the .ldb file to show that it is no longer connected, and that the two legacy apps still are -- EXCEPT -- it writes the .ldb file in two byte per character format, which the legacy Access 2.0 apps don't understand. What ends up happening is that the legacy apps continue to run, but I can't start up another legacy app because the .ldb file is "updated," and, if I quit a legacy app, I can't restart it unless I've quit all the legacy apps (thus deleting the .ldb file).
What I need is to have a driver that will rewrite the .ldb file in the legacy format when there are legacy apps using the .ldb file at the same time (i.e. 1 byte per character). VB6 driver would do this, but the new Jet 4.0 driver does the above behavior. I've seen some references to dll's that emulate the old behavior, but I don't know how to put them in place of the 4.0 driver (I see no other providers than the 4.0 driver). Anybody have any ideas?
-Owen
P.S. Yes, I have to use Access 2.0, until they update it to SQL server later this year. The bitch is that it worked with VB6, and now the new update to .NET kills it.
-O
|
|
|
|
|
Wow. Didn't know anyone still used Access 2.0
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
owen hartnett wrote: Yes, I have to use Access 2.0, until they update it to SQL server later this year.
Thankfully, there's only 4 months left.
owen hartnett wrote: The bitch is that it worked with VB6, and now the new update to .NET kills it.
That's because the .NET Framework requires an updated MDAC be installed, which updates Jet to 4.0. No, the components do not reside on the machine side-by-side. As far as I know, you're S.O.L trying to use a .NET solution for such an old database.
|
|
|
|
|
I've actually solved *some* of my issues, but the major one remains.
First of all, I can send "JET OLEDB:Engine Type=1" in the connection string, and the JET engine won't default to double byte on close.
However, when I close the Jet connection, it puts a "delete pending" on the .ldb file, effectively shutting it down for further connections until everybody quits the .mdb file and the .ldb is destroyed.
Here's the scenario:
Open an access database in Access 2.0 shared simultaneously on 2 workstations.
Open an ADO connection in VS 2005 to the same database (you can even make the mode "read" and it still happens)
Close the ADO connection. This is where all hell breaks loose. ADO puts a "Delete Pending" on the file (according to FileMon). The two Access 2.0 can continue to use the database, but VS 2005 can no longer open it, and no further Access 2.0 workstations can open it. If either of the two Access databases quits, then it's locked out until all the other ones connected at the time quits.
It looks like a bug in the .dll that drives Jet 2.0 access through the Jet 4.0 provider. I tried ODBC, but that seemed to have the same problem, and there wasn't a way I could specify previous JET versions through ODBC.
So, I'm again at a loss. Anybody have any clues on how to stop this "DELETE PEND?"
-Owen
|
|
|
|
|
How can we resize and move a label control in all directions in dot.net environment at runtime on a windows form.
|
|
|
|
|
Size and location properties? Not sure what you're confused on here..
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|