|
how to convert csv to vb.net data table
the csv file have 10870 rows 12 columns
that i am not able to read please give the solution
i am using vb.net windows application
|
|
|
|
|
Instantiate a DataTable , add appropriate DataColumns , foreach line in the file...
1) Use the DataTable 's NewRow method to create a new DataRow
2) Split the line on the commas, and foreach the resultant array, populating the DataRow
3) Add the DataRow to the DataTable with the DataTable 's Add method.
|
|
|
|
|
sir,
I am developing an application in ASP.NET using VB.NET.My backend tool is MS-Access.How can i select time only from a date time feild...
Actually i want 09:00:15 AM/PM only...But its displaying 12/12/1987 09:00:15 AM/PM ...
Praveen.K
System Engineer
Graviton Technologies Pvt.Ltd
|
|
|
|
|
use the format command i.e
Format(yourdata, "h:mm:ss")
|
|
|
|
|
Although VB6's Format still works nicely, you're better off using .net's built in properties, because you can never be sure about the settings of client PCs and servers, etc:
Depending on what exactly you need you can use:
YourDate.ToLongTimeString
or
YourDate.ToShortTimeString
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi I have one form in main page and I had to create another form on a user control page where i have a voting poll. i get below error when i run the site
Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.
i saw some articles where it advises you to do visible=false but i want to have both form's control functional how will i be able to do it?
in my usercontrol, i have a asp:radiobuttonlist, a textbox and a submit button. I tried to get a reference of the main form i.e.
Dim form as control
Me.findcontrol("MainForm")
but previous developer wrote a lots of messy code so name of the main form changes from place to place so i think its not a good idea to get a reference of the main form.
is there anyway i can have those form populated in usercontrol so that i could collect some data from users as a voting poll
please help
|
|
|
|
|
You might check to see if the usercontrol has a form tag. You can remove it from the usercontrol and only have the form tag in the web page.
|
|
|
|
|
user controls will have plain code, i.e no html, head, body, form etc etc. you can just write your design code directly
Gautham
|
|
|
|
|
we are able to have multi form on page etc.but you can show in it at a time 1.
on page load etc true you required form by passing query string like
abc=request.querystring("id")
if abc=1 then
form1.visable=true
form2.visable=false
else
form1.visable=false
form2.visable=true
endif
|
|
|
|
|
I am going to dive into industry control using PC program.
And now what i need, i think it is some books suggested from u. Some websites or BBS and heart words maybe
Thanks very much!!!!
By the way. I am now using VB.NET
MSN:msnadair@hotmail.com
Skype:skyadair
|
|
|
|
|
A good start would be:
http://www.google.com
My advice is free, and you may get what you paid for.
|
|
|
|
|
codeadair wrote: I am going to dive into industry control using PC program.
That's a very, very generic description of what your going to be dealing with. There is no one book that covers everything about the subject. You're going to have to be much more specific about what your dealing with, like Ladder Logic, PLC's, what types of controllers, yada, yada, yada, ... And start Googling them yourself.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have a voice recognition program in Visual basic 2005 express edition. The computer recognizes my voice and talks back. It works, but I was wondering if the computer could recognize if the person was male or female by tone of voice. Is this even possible? Help is much appreciated.
David Kramer
|
|
|
|
|
Haven't you ever met a really butch she male, or a really poncy guy ? I doubt it's possible.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for helping anyway
|
|
|
|
|
It obviously must be possible, after all humans do it all the time, BUT I'm not sure any technology exist currently to do this. I bought a speech recognition program a few years back and although talking to your computer is nice, the error rate was pretty bad even after I trained it to my voice. And as I understand it most voice recognition systems are heavily reliant on looking at the probabilities of words coming before and after each other to figure out what you said, which means that they are even worse at recognizing sounds than they appear.
Just out of curiosity did you write the voice recognition yourself or did you use some sort of off the shelf voice recognition engine in your program?
Mike
|
|
|
|
|
Yah, I used Microsofts Speech Sdk 5.1 Im just doing this as a fun project and might use it around my house and thought my family might want to use it. Thus, I wondered if it could recognize tones. Its just simple Voice Recognition, like setting the grammer(etc).
|
|
|
|
|
I have 2 pics in a vb program resource file.
Is there anyway that on form load that i could select which image i want to display in a picture box. I would imagine it would be an if, but i am trying to do and the below obviously aint working but shows you what im trying to do:
If intScoreTop < 4 Then pcbProbUpper.Image = Resources(smiley1)
else pcbUpper.image=resource(smiley2)
end if
Cheers
Using VB.NET 2005
|
|
|
|
|
Yes, this works, what you need to research is how to load an image from resources. I have done it in C#, but not VB.NET.
protected Image GetImageFromResources(string name)
{
// get a reference to the current assembly
Assembly a = Assembly.GetExecutingAssembly();
string my_namespace = a.GetName().Name.ToString();
Image image = null;
image = new Bitmap(a.GetManifestResourceStream(my_namespace + "." + name));
return image;
}
is the method I use. IF you have a folder called Bitmaps, a folder called Girls, and a file called Jessica.jpg, you'd pass "Bitmaps\Girls\Jessica.jpg" to this method. The folders get turned into namespaces, actually.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I think you want to reference them this way:
My.Resources.[Image Name here] A property is actually created when you add a resource so under My.Resources there should be a property with your images name.
|
|
|
|
|
|
Hello!
I would like to create an application in VB6 (preferably, but VB.NET can be used) which will allow me to view/edit files store on a hidden partition in windows. To make matters worse, the hidden partition is on a compact flash and not a harddrive.
I have checked the CF using device manager. There are 3 or 4 paritions, the primary partition (which Explorer can access), and an extended partition with 2 or 3 logical partitions on it. I would like to see / add / remove files to these partitions.
I have no idea where to start (a DriveBox wont see the partitions, nor will the fso, and I have experimented a little with WMI but not too much).
Can somebodjy give me some pointers please? Or, can Windows actually view hidden partitions on a CF (I have Windows XP Pro - that is the only OS that I am interested in).
Thankyou
|
|
|
|
|
Partitions are not accessible using standard methods and controls. DriveBox won't see them. Partitions contain Volumes, the type of which is determined by the file system that created the volume. DriveBox WILL see volumes if they are valid and assigned a drive letter.
Since none of the standard file methods will work on hidden volumes and partitions, you'll have to write all of the low-level code to parse and interpret the volumes in these partitions. NOT a fun job...
Your better option is to use a Partition Management (like Partition Magic) utility to remove the hidden attribute from the partitions so you can then see the volumes (if any!) on them and use the standard File I/O methods to access them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
Im trying to get fields from a database to show in a combo box. I am able to do this through the wizard, but would prefer to do it manually. this is what I've done so far, but obviously it doesnt work, was just hoping someone could tell me where im going wrong.
ComboBox2.Text = dataSet.Tables("Requirement").Rows(inc).Item("RequirementType")
ComboBox2.Text = dataSet.Tables("Requirement").Rows(2).Item("RequirementType")
This obviously doesnt work! (only shows ONE field)
Also is there a way to manually make a list of things you want to put into the combo box?
Thanks in advance
Jaidev
|
|
|
|
|
ComboBox2.DataSource = dataset.Tables("Requirement")
ComboBox2.DisplayMember = "RequirementType"
ComboBox2.DataBind()
something like that
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|