vb.net

"is not a valid name" error while retrieving data from csv/txt file using oledb

I retrieving data from a csv/txt file using oledb driver ConnString = "Provider=Microsoft.Jet.OleDb.4.0; Data Source = " & System.IO.Path.GetDirectoryName(strFileName) & "; Extended Properties = ""Text;HDR=YES;FMT=Delimited""" strQuery = "SELECT * FROM [" & System.IO.Path.GetFileName(strFileName) & "]" In the last line I am getting ...

access to standalone app with more stable database

Hi, Does anyone have experience of rapidly translating an access application into a standalone windows application? My current thoughts are to create an SQL database and a gui in c# and vb, or adobe flex 3. As with acces, the GUI would mainly comprise of controls such as radio buttons, combo box (populated from a table), check boxes, t...

How to commit changes to access database using datagridview in vb.net?

Please help, I got the code below from a book but it doesnt seem to work: try oledbDataAdapter1.update("GH") Catch ex as exception msbox(ex.tostring) end try I'm using ms access 2003, here is my connection string: Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\ACCESS DATABAS...

how to add a xmlnode in a particular postion of xml file using vb.net

could anybody help me to write nodes to existing xml file to a particular position using vb.net? <xml> <person> <name>a</name> </person> <person> <name>b</name> </person> <person> <name>c</name> </person> <person> <name>d</name> </person> </xml> here i want to insert a node just after the node person wh...

Move files to a specific folder when run the setup file for VB.Net Application

Hi, I have created deployment package for VB.Net appolication and it runs fine. When setup is rnning, I want deployment package to move a file from bin folder to other specific folder. Please suggest, how can I move this file to specific folder. Any help would be appreciated. Thanks, Yogi ...

Slow Loop Execution In VB.NET 2003

I fill data in C1FLEXGRID from DataTable using for...each loop with DataRow and DataRowCollection but it gives output very slow. How can I solve it. ...

How can one extract/convert information from a Listview (to a DataTable)?

I have a relatively simple Listview that suddenly needs (due to new requirements) to have it's 'layout' extracted to a DataTable so that a common routine can convert it to an Excel spreadsheet for export purposes. The ItemTemplate is just a series of Table Rows with some text, data-bound labels and textboxes with validators in the cel...

Exception message reads "System.Windows.Forms.MouseEventArgs"

I'm currently working on updating an ms access database by using this code: the error is: System.Windows.Forms.MouseEventArgs I don't know what is it, can you help me solve my problem, adding, deleting, listing, searching for records is already working. If I can finish this update then I can proceed with the system that we are doing for...

Improve performance of DataSet.InitClass

I inherited a giant dataset that my profiler notes that the InitClass method takes over 5 seconds to load. This is generated code so, other than removing unneeded datatables etc... is there anything I can do to improve the performance of this method? This is in VB.NET EDIT The profiler says that 99% of the time is spent inside the m...

Extending Enumeration Definition in a child class in .NET

I have a base class which needs to define an enumeration: BaseClass - SomeEnum I then need to create two derived classes from the base class and extend the values in the enumeration: ChildClass1 : BaseClass - SomeEnum - SomeEnumValue1 ChildClass2 : BaseClass - SomeEnum - SomeEnumValue2 In C# or VB.NET can someone provide th...

Preferred Method to Catch Specific OleDB Error

Ok - I have a situation in which I must execute a dynamically built stored procedure against tables that may, or may not be in the database. The data retrieved is then shunted to a VB.Net backed ASP based report page. By design, if the tables are not present in the database, the relevant data is automatically hidden on the report page....

Serial COM-connections 64bit versions

Hi, I have a .net Application that writes text to a serial COM port, a POS reciept printer to be more exact. i am using the Rs232 class library to write and read to a serial device. My problem is now with some clients that have updated their operatingsystem to WIN7 64bit version, have trouble to create a connection to the COM-port. th...

Cannot get listview icons to refresh when I change the image list

I have a listview and an imagelist that I populate with thumbnails dynamically through the backgroundWorker function. Once that is finished, I have it overwrite the imageList and listView in the main form's view, and if I watch the debugger watch list, it updates perfectly(this creates thumbnails and links them via tags to the appropriat...

How do you randomly zero a bit in an integer?

Updated with newer answer and better test Let's say I have the number 382 which is 101111110. How could I randomly turn a bit which is not 0 to 0? The why; Since people ask me why, I simply need to do this, removing a bit from an integer. based on the answer here is the result(working one) I ran this using System; using System.C...

Get value of variable in ASP.NET from within a static/shared class using reflection

Hi, I have a VB.NET website which has a static (shared) class from which I need to obtain the value of specific variables that may exist anywhere in the application's scope. The reason I have this need is that I have snippets of text coming from a database which contain embedded variable names, such as [[FirstName]]. I need to repla...

ASP.net user data getting crosses between users accessing objects

This is kind of a weird one. I'm looking for ideas on how to ask the right question as much as I am an actual solution. I've got a website and we just had a huge jump in traffic. Now all of the sudden we're getting sql parameter errors left and right. We switched to a new sql server a few weeks ago and everything has been fine but the a...

vb .net project issue

I have a vb.net project with many subfolders. One of them is called "photos". now in my .master page, i have made the background for all other pages. so when the .aspx pages load from one of the sub folders, i give path in .aspx as "../photos/img1.jpg". this all works fine. btw my .master page is in root folder. now i have to call the sa...

Overridable Constant?

Maybe I should just make this a public member, but I keep thinking it should be a constant. SCENARIO I have forms I'm rendering into PDFs (using iTextSharp). In code, the forms themselves all inherit a base class (OrderForm). Within OrderForm, there are a list of constants that I use for measurements when aligning things for the PDF re...

Parse percentage to double

Is there a better way to parse percentage to double like this? Dim Buffer As String = "50.00%" Dim Value As Double = Double.Parse(Buffer.Replace("%",""), NumberStyles.Any, CultureInfo.InvariantCulture) / 100 ...

Blogs to follow?

What's your list of blogs for anything asp.net and vb.net related. I know for instance Scott Gu's stuff is the first on the rank for asp.net. I'm trying to compile a list of 'good' stuff that will teach me things as I read, the more I gather the better, this way I'll get several posts a day, as most blogs post only once a week if that. ...