Storing Equal Signs (=) In XML Documents?
Sep 10, 2010
I'm facing a problem that Google couldn't solve yet!I'm trying to store URLs in an XML file. Problem is that these URLs contain Equal Signs (=) in them. And that generates an error.Here is my code: (**token is a variable that contains the URL)
Dim child As String = vbCrLf & "<Link URL='" & token & "'></Link>"
Dim fragment As XmlDocumentFragment = doc.CreateDocumentFragment
fragment.InnerXml = child
[code]....
View 3 Replies
ADVERTISEMENT
May 6, 2011
I have this database with a table which has the the following but I have no way to decypher it
DATA, TYPE, FILE TYPE, SIZE, DOC TYPE
0x15234324 , Word.Document.8 ,DOC, 19968, WORD.DOCUMENT.8
The field seems to contain a word document stored in a SQL Server IMAGE column
Has anyone come across this before or a way to extract this data in a readable format?
So far I have tried using PHP to extract the file and write it to a word document but not had much luck.
UPDATE: I now have Visual Studio Express and would like a way to extract this data and save to a word document
UPDATE2: This is what I have in VB sofar
Imports System.Data.SqlClient
Imports System.IO
Public Class Form1
[Code]....
View 6 Replies
May 19, 2012
In the following LINQ query, i would like when the Loc=Locale.Gr all the records with GrID=100 returned and when the Loc is anything else all the other records with GrID <> 100 returned.How can i achieve this one? I tried something like the following, but it is totally wrong.
PrivateSub Test(Byval Loc as Locale)
Private Const GrID as integer = 100
Dim Query = From c In Mob Where c.CountryID = IIf(Loc = Locale.Gr, GrID, <> GrID) select c
End Sub
[Code]...
View 1 Replies
Feb 2, 2010
I've been asked to get the page counts for documents stored as tif files. What I have now is looping through our third party software to open them and then get the page count. I can't stop the image from flashing and it is very slow. Does anyone know of a way to loop through them quickly and can the page counts (one image can have many documents)?
View 5 Replies
Mar 8, 2012
How does one check to see if the system time is equal or not equal to a specific time? So, say I want to perform an action if your system time is between 6pm and 6am. Or something similar?
View 1 Replies
May 22, 2009
I want to create a log that shows when users sign into this program, so I can see who makes changes to it. What is the best method of doing that?
View 5 Replies
Feb 6, 2012
In code, why wouldn't this work? intMax = intTopValue = 20
View 2 Replies
Feb 13, 2011
In code, why wouldn't this work?
intMax = intTopValue = 20
View 1 Replies
Sep 28, 2009
Sign out user if someone else signs in with the same account Anyone have code in VB that will do this?
View 3 Replies
Jul 22, 2010
I'm usually a LAMP developer, but some .NET work has arrived. If I run the following code:
<% poundsign = "£" %>
<% Response.Write poundsign %>
<% Response.Write "£" %>
Nothing is displayed. However, outside of the <% %> tags (i.e., in the HTML) £ displays correctly. I have no trouble displaying the usual alphanumerics, it's just the £ sign that is proving problematic. The underlying file is in Windows 1252 encoding, and I need to serve it as such. If I save the file as UTF-8, I get mojibake instead of a £. What I can do to make this work, or any settings that might be preventing it from working (other than saving the file in a different format)?
Aside from the fact that my £s aren't appearing on the page, a major part of my problem is that I need to insert strings containing £ into a SQL server database, but if I form a SQL INSERT statement within the ASP, none of the £ signs end up appearing in the database. Inserting £ signs into the database from ASP isn't a problem when I save the .asp files as UTF-8 files, but I need everything to work in Windows 1252 encoding.
View 4 Replies
Jun 21, 2012
No matter what I try, it never matches the sign. I even tried using the string as the pattern. This function should be able to take a string like 1 day -36mins + 2s -1s and parse it into a TimeSpan object. Any pointers?
[Code]...
View 1 Replies
Sep 22, 2011
I'm just starting to learn VB and I can't seem to get the label to display 4 separate lines that I wanted it to. It always seems to display Grand Total: (number)[code]...
View 7 Replies
Nov 7, 2011
We were given this and for some reason I can't get this to work right. Here is the whole thing:The following code should display three rows of percent signs in the msgLabel. The first row should contain one percent sign, the second row should contain two percent signs, and the third row should contain three percent signs. However, the code is not working correctly.
[code]...
View 17 Replies
May 7, 2009
I need to write a program that uses constants to establish the base pay, the quota, and the commission rate. The Pay menu item calculates and displays the commission and the total pay for that person. However, if there is no commission, do not display the commission amount (do not display a zero-commission amount).Write a function procedure to calculate the commission. The function must compare sales to the quota. when the sales are equal to or greater than the quota, calculate the commission by multiplying sales by the commission rate. Format the dollar amounts to two decimal places; do not display a dollar sign.The summary menu item displays a message box that holds total sales,total commission,and total pay for all salesperson. Display the number with two decimal places and dollar signs. the Clear menu item clears the name, sales, and pay for the current employee and then resets the focus.The Color and Font menu items should change the color and font of the information displayed in the total pay text box.Use a message box to display the program name and your name as programmer for the about option on the Help menu.
[code]...
So the issue is when I push the pay/calculate button everything is calculating correctly the first time, but then when I push clear to input another workers name and weekly sales and push calculate, my label is blank and does not display any info about the second worker. Then when I push summary after inputting the second worker, it's only displaying the total calculations of the first worker. I can't seem to figure out this problem on my own (After countless hours staring at my code I might add!), so I am hoping somebody can pinpoint what I have done wrong? EVerything else is seeming to work just fine.[code]...
View 1 Replies
May 27, 2011
I am running a command on all computers from a list. I am trying to get back a text file that says PASS or FAIL for each computer. I am using the below StreamWriter and function process. The process runs correctly and it rights to both a data file and an error log. The error log however always says PASS for everything. do I know what to set the if consoleOutput = "????" to?
Using swrr As New StreamWriter(ErrorLog, True)
For Each strUserName As String In strLines
Dim ConsoleOutput As String = GetCMDOutput(strUserName, saveFileDialog3.FileName & ".txt",
[code].....
View 1 Replies
Oct 29, 2011
How to use the signs "+", "-", "*", "/" as label text randomly. I am trying to create a math game for my kids. There I need a random sign to display every time they get new question to solve. I am able to display values [random numbers] but could not able to use this signs randomly as a single label text.
View 8 Replies
Feb 25, 2010
i want the user to login, and the first thing is, having the text document for that(if theres a safer way to do it, let me know) then it goes to the weekly sales page, but theres also the goals for the sales, which rarely change, but if they do i would like them to be able to change them, then next page is the list of the workers, and if they need to i would like them to be able to add workers. so my question is: is there anyway that maybe i could save both the goals, and the workers in the text document, and when they need to change it/add workers it will save it in the text document and the next time they sign in the changes will be permanent? also is there a way to delete the user once they have been created, other than going into the txt document and deleting it.
View 2 Replies
Feb 6, 2010
On winxp sci. calculator when you press 9x9=81 you get 729 when you press = again.How can i add this feature to this code i already have.
View 2 Replies
Sep 17, 2011
Yesterday I asked why a adding 10 times 0.10 to a double is not equal to int 1;in VB Why (1 = 1) is False.I got an excellent answer. The overview is because:Floating point types and integer types cannot be compared directly, as their binary representations are different.The result of adding 0.1 ten times as a floating point type may well be a value that is close to 1, but not exactly.I can see the reason why now. However, if I do something like:[code]In this case I really obtain equality between double 1.0 and int 1. I thought then that double were only approximations so I would expect d to be somehow a value close to 1 as in the original first question. Why is not a good idea to compare directly different data types (in this case double - integer) and why I this time I obtain equality ??
View 2 Replies
Dec 28, 2011
I have a Date variable startdt and a String variable hdnsdate. Suppose if startdt has the value in the form 3/1/2012 and hdnsdate has the value in the form 03/01/2012. Than how can i compare that these two dates are equal in vb.net. In if condition of my program i want to do this check. In case the two dates match move out of if loop otherwise go into the if loop. E.g A sample in C# what exactly i want.
[Code]....
View 2 Replies
May 20, 2011
I'm a little foggy on System.Type versus an actual class type (like Object or XmlDocument) in .NET... will this code correctly determine if the type of a particular object is equal to a class I specify?
// Given "myObject" (unknown type), and some class type (let's say "MyClass")...
If myObject.GetType.Equals(MyClass)
If TypeOf(myObject) Is MyClass[code].....
Which one is correct? Bonus points if you can provide some information on what a class identifier is versus what a System.Type is. :)
Note: The language doesn't matter here, VB.NET or C# is fine, the code above is pseudocode.
View 2 Replies
May 31, 2011
I would like to compare dates (not times) for 2 datetime variables. I get one of the dates from database as follows and comapre it with yesterday.How can I do it?
[Code]...
View 6 Replies
Apr 13, 2010
Why does the first if statement evaluate to true? I know if I use "is" instead of "=" then it won't evaluate to true. If I replace String.Empty with "Foo" it doesn't evaluate to true. Both String.Empty and "Foo" have the same type of String, so why does one evaluate to true and the other doesn't?
//this evaluates to true
If Nothing = String.Empty Then
[CODE]...
View 3 Replies
Nov 8, 2011
I'm trying to set a text box equal to a value in dataGridView and I keep getting an error index out of range.The dataGridView is data bound to a stored procedure. When I move the text box setting to initiate after the form loads and a button is pressed it works fine; however, when it tries to automatically load after the fill command it errors out. The following code is what I have:
[Code]...
View 1 Replies
Mar 25, 2010
I want to test if an image in a picturebox is the same to another image in a picturebox?Also, i get my images from a listBox.I need to use i as a conditional in an if statement.
If (picBox2.Image = picBox1.Image) Then
' code ...
EndIf
[code].....
View 5 Replies
Jan 29, 2011
I would like to set stringa and stringb to be equal and then clear stringa like so:
Dim stringa as String = "abc"
Dim stringb as String
stringb = stringa
[Code]....
However this code sets up a link between the 2 variables, so when I clear stringa stringb is also cleared.
View 1 Replies
Oct 6, 2009
I am trying to write an IF statement that checks to see if a certain String variable is not equal to a certain value. What is the best way to do this?
Method #1
IF NOT(Nametxt.Equals("Fred")) Then
x = 3
[code].....
View 10 Replies
Apr 13, 2010
How do I declare/define a ResourceManager in the following code so it doesn't equal Nothing when it reaches rm.GetString("Magnitude") in the following code? My.Settings.. is returning a valid string.
Imports Gigasoft.ProEssentials.Enums
Imports System.Resources
Imports System.Configuration
[code]....
View 6 Replies
Feb 12, 2010
This makes no since to me I have a textbox that the user will put in information that I need to cut off so I wrote this code
txtMatID.Text = Trim(Mid(txtMatID.Text, 1, (InStr(txtMatID.Text,
"-") - 1)))
The user will imput a number value then a - then some words after that. I just want the number value. But when I try to debug the app it breaks on this line of code with this error. Argument 'Length' must be greater or equal to zero.
View 11 Replies
Jun 13, 2011
In my decryption statement I am getting
Argument 'Length' must be greater or equal to zero. is this statement wrong
DecodedStr = Mid(DecodedStr, 1, InStr(DecodedStr, Right(DecodedStr, 4)) - 1)
View 2 Replies