o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

[2005] String.Concat generates a string but issuse a format not supported exception -

I need help with this perplexing problem.

The following is ment to generate the path to a text file and stream the data found there into an array.

Dim y1 As String
Dim y2 As String
Dim y3 As String
Dim path As String
Dim b1 As String
Dim b2 As String
Dim z As Integer

y1 = ("L:\Gossary\ListBox")
y2 = (" data.txt")
b1 = ("(")
b2 = (")")
z = ListBox1.SelectedIndex
y3 = z.ToString
path = String.Concat(b1 + y1 + y3 + y2 + b2)
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(path)


MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters("@")

Dim currentRow As String()
While Not MyReader.EndOfData
Try
currentRow = MyReader.ReadFields()
Dim currentField As String
For Each currentField In currentRow
CurrentFieldArray.Add(currentField)
LblSource1.Text = currentField
Next
Catch ex As _
Microsoft.VisualBasic.FileIO.MalformedLineException
MsgBox("Line " & ex.Message & _
"is not valid and will be skipped.")

End Try
End While
End Using

However this produces the following exception:

"The given path's format is not supported."

 

[2005] String.Concat generates a string but issuse a format not supported exception -
I need help with this perplexing problem. The following is ment to generate the path to a text file and stream the data found there into an array. Dim y1 As String Dim y2 As String Dim y3 As String Dim path As String Dim b1 As String Dim b2 As String Dim z As Integer


[2003]converting a date to a string type and then concatenation..urgent -
Dim str1 As String = "3-12" Dim str2 As String = "14-19" Dim str3 As Date = Format(CStr("200703")) Dim strRes As String = String.Concat(str1, str2, str3) when I run the code from here the error that generates tel


[2005] String.Concat vs & -
I was given some code from someone else and was surprised to see String.Concat being used. I don't like it as I don't think it is as readable as the & operator. What do you think? Is String.Concat faster for 5 concatinations? Code: Dim strDate As String = Me.datePicker.Valu


[2005] Format Exception was Unhandled -
Having this problem and I CAN'T FIND where it is going wrong. Here is the code... Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load With lstOutput1.Items .Add(String.Format(strZones, "Employee", "Hourly


[2005] Concat string -
I need to insert a new row into my dataset with Customer No C1234 where 1234 is a autonumber value which I retreive from the database. However, I can't seem to get to to work. My codes are shown below: ........ Dim dr As DataRow = ds.Tables("tblCustomer").NewRow dr


datetime parse problem -
hi there. I have a field in SQL where it accepts DateTime I have got 2 text boxes in a web based app. (Date and time) and i have made a string in vb.net to concat the 2 with a space between them I have then tried to convert that string to a datetime object and fire it off


String.Concat -
Hello !! My questioning myself about something ... Phylosophique i think .. Do i should use String.Concat or "&" ? Like this context ... "SELECT * From Tables WHERE Id = ".Concat(lnlIdTable) OR "SELECT * From Tables WHERE Id = " &


How to format a string -
I have 2 strings, A and B. How do I concat the 2 strings together into string C, so that string A will always start at position 0, space filled till position 79, and string B starts at position 80? Thanks!


Help Please with Creating in a Class and Calling into main form - Different from last -
Hi Everyone Ok I have created code with help from great programmers on this forum, and it works under the main form, populates the four fields, which are Charactor, Word, Sentance and Paragraph. The program is count these subjects and putting values in. On my main design for I have


remove null termination from string... -
I am using an API call that you pass a string buffer to and it returns a value.. its fine except that I need to concat the return value with another string in my function and return this total value. but since this string that is returned by the API call is null terminated, the concat


function parameter limits -
hey all. I was just thinking about the String.Concat() method in .NET. If I were trying to replicate that in VB6 (and I'm not, just wondering) I got stuck on the question of how to send unlimited parameters to a function. I know I could concatentate the parameters and split th


[VB 2005] Clipboard Monitoring -
I am writing an application in Visual Basic 2005 that takes a string from the clipboard and, depending on if that string is a certain format, will turn that string into a designated string for that format. For example, if “36/52” is in the clipboard, I press a button to convert it


[2005] A first chance exception of type 'System.InvalidCastException' occurred -
Sometimes, my program generates this kind of exception: A first chance exception of type 'System......Exception' occurred in MyCode.exe The program does not stop because of it, only shows this exception in debug window. So, I'm not sure where this happened. Is there a way to force


[2005] String match -
The format string that I’m comparing to is defined with “n” for a number “s” for alpha and “/” precedes a literal. In other words, if I wanted to see if the serial number “SN-12345” was in the correct format, the format string that it would match would be “ss/-nnnn


Oracle CONCAT -
Is there a way to concatenate ore than two strings together using an ORACLE CONCAT statement. I don't want to have to resort to the following:- Code: CONCAT(CONCAT('A','B'),'C') ....as I've got four rows from a table that I need to concat together.... Is there another way? I


Clipboard Monitoring -
I am writing an app that takes a string from the clipboard and, depending on if that string is a certain format, will turn that string intro a designated string for that format. For example, if “36/52” is in the clipboard, I press a button to convert it to “/msg ap-dcc36 xdcc sen


BadImageFormatException error (2005) -
I get this error when trying to use a certain DLL. This works perfectly on my DEV system, where I also have ASP.NET 2.0 installed. The only difference at all is the Dev system uses HTTP and the prod system uses HTTPS. It is on the prod system that it does not work. What's the deal here


Incredment Based On Fiscal Year -
I have this code: Code: If TRANSPORT_NUMTextBox.TextLength = 3 Then TRANSPORT_NUMBER_FULLTextBox.Text = String.Concat("09-0", TRANSPORT_NUMTextBox.Text, "-", TRANSPORT_SUFFIXTextBox.Text) ElseIf TRANSPORT_NUMTextBox.TextLength = 2


Resolved [2005] Just can't get a string to format -
I have a 'date' string value of "19561206" which is 12/06/1956 but for the life of me I can't get a format/converter that will convert this to a ShortDateString. I would also gladly settle to just format the string as it is to "12/06/1956" ( I can do that very manu


problem invoke into web service -
Hi, please help me in this error Server Error in '/EMOS/web' Application. -------------------------------------------------------------------------------- Request format is unrecognized. Description: An unhandled exception occurred during the execution of the current web reque


string alignment in listbox -
i concat two string username and age with some space in a list box. there are 15 records. i want perfect left alignment in all records. but due to two string it is not possible. how can it is possible????


[2005] Function Optimise -
Hi all, I am using this function to add a ; between the strings.How can it be optimised Code: Public Function ADDColumntoStrings(ByVal sStr1 As String, ByVal sStr2 As String) As String 'sStr1-Main string 'sStr2-String to cancatenated with the ma


String Formatting Question -
Hi, I have to display credit card no. in a datagrid column as (####-####-####-####) format, the number is stored as string in a table. If the column is in numeric format, it can be formatted using Format or for DataGridColumnStyle, setting the Format property. However, it does


Quicky on Proper code for call Class -
Hello Ok I have created a class I think it is right, I am writing the code to calling up from the class to populate design form fields. Below is the code for a "Analyze File" button ( using Openfiledialog) and "Analyze Text" button. on the File button I get this


[2005] Format A String - 15 Characters -
How do you make a string of any length into a 15 character string? Add spaces to the right end if needed.


[2005] Get string from javascript -
Hi all, I'm stuck on this and I don't know how to get this going. My page has got a javascript function that runs on client side and generates a string. I need to get that string into an asp.net element (textbox) in order to run a function and to do stuff to the string at the serv


phone number and postal code formating -
Add two string fields to the table that contains the country. Store the format string for the phone number in one (in this example I've named it fsPhoneNumber) and the format string for the postal code in the other. (BTW the format string for the phone number is (###)###-#### but I don


Need Help - Auto Fill the Windows Authentication Prompt -
I wrote a service that monitors directories all over my network. As the company grows, my service is becoming more and more utilized. I now have to monitor drives and devices through VPN tunnels on different domains. Up to this point all my clients have been willing to add in my servic


[2005] Randomly -
I have a few questions: 1.Is it possible to have 3 string variables: dim strNice as string = "Nice" dim strBad as string = "Bad" dim strFine as string = "Fine" now i want a msgbox to display one of these variables not all.. msgbox(Select a Ra


quarter data format -
is there any date function/format that generates quartes. I' have database that has Q1Y07, Q2Y07 etc... as values and I need to do some comparison again this month's quarter. any suggestions beside extracting the numbers from the string and comparing them against this monthj's??


Vbnewline and vbcrlf problem by converting to Hex - RESOLVED -
HI! I’m trying to convert a formatted string to Hex. It seems to going well. I’m getting problem with the format “vbNewLine” and “vbCrLf” both represented inside the string with “”. Their Ascii values are “13” and “10”. I read that this character () is no


Function Error -
Hello Everybody: I am trying to develop a function to concate three strings . When I compile it gives me a compile error .Can anyone tell me whats wrong? The error is : Method 'Project01.Form1.Variable(string, string, string)' referenced without parentheses public string


VB.NET Date Format -
Hi, In VB, I can use the Format function to say format a string to a date like format: format("20051010","0000/00/00") ==> 2005/10/10 Then I can convert it to Date type. In VB.NET, the same calls does not return what I want. I also tried to use CDate(


Question on String.format -
just Started vb.net,can someone help to understand how to use string.format with a few examples? what's the use of {0} in the String.format? also why the .ToString in dotnet? thanks


[2005] msgbox generates exception -
I have an application which uses a thread to do some time consuming work. when the work is done, in the thread, I use MsgBox("Work Done.", MsgBoxStyle.Information Or MsgBoxStyle.OkOnly) to notify the user. however, I found that some times, it will generates exceptions


String.Concat and String.Copy -
I found this online: Code: 'The following source code concatenate two strings. Dim str1 As String = "ppp" Dim str2 As String = "ccc" Dim strRes As String = String.Concat(str1, str2) Console.WriteLine(strRes) 'The following source code concatenates o


CONCAT Statement -
I've been trying to find a good explanation of what CONCAT is used for, and how to use, but everything I've read just confuses me. In plain and simple language, what, and how, is this keyword used?


When Run ASP.Net Appication system generate this error -
Server Error in '/Patwar' Application. -------------------------------------------------------------------------------- Debugging is not supported under current trust level settings. Description: An unhandled exception occurred during the execution of the current web request. Ple


unhandled exception error/ null-string(solved) -
hello all i have a textbox which checks for valid usernames, when i click my login button a blank field within the textbox generates an unhandled exception error DBnull to type string is not valid appears and then type application crashes, i have a textbox to check for nothing


concatenation in sql!!!! -
how do i concatenate field in my access database. i know you can do this for a number field: UPDATE tblTable SET numberField=numberField+1 but for a string ?? here's what i tried!!: UPDATE updateFlash SET updateFlashRows = CONCAT(updateFlashRows,'" & row & &qu