vb.net

vb.net ado.net update

How can i add and update new row into sql server through vb.net? The foll code is generating error on update statement. Dim cb As New OleDb.OleDbCommandBuilder(da) Dim sql As String sql = "SELECT * from resumemaster" connect(sql, "resumemaster") Dim dsrow As DataRow dsrow = ds.Tables("resumemaster").NewRow Fo...

What's the last possible event I can catch after a user control has been shown in .net, winforms?

Hi, as the title says, I'm looking for an event to catch after a user control has been shown. At the moment, I have to set a do-once variable and catch the Invalidated event. ...

How to add a items in the dropdownlist

Using VB.NET I want to add a data's in the Datagridviewcombobox column Code. cmd = New SqlCommand("SELECT Sched_Name from tb_Sched_Master", con) ada = New SqlDataAdapter(cmd) ada.Fill(ds1) x.HeaderText = "Select Employee" DataGrid4.Columns.Add(x) x.Items.Add(ds1.Tables(0)) But I cannot get the data's, what wrong ...

fast way to delete files

Hello, i want to delete some files but only if they aren't in use. What i did was a try/catch: Try My.Computer.FileSystem.DeleteFile(fileInfo.FullName) Catch ex As Exception End Try but it seems that this method is very slow if i try to delete some files over network. Is there an faster way to delete files? Is i...

How to insert a value in the table?

Using VB.Net Am new to vb.net, Am using datagridview DataGridview ID Name ComboboxColumn 001 Raja 002 Ravi 003 Suresh ..., "Save" - Button In a Datagridview am Using combobox column in a third column Suppose If i select the value from the combobox, then i Press the save button means, The Datagridview column value should save in ...

Windows Service not able to access mapped folders

Hello Experts, I have a very simple VB.net Windows Service written using VS.net 2008. The program after doing several other functions writes a log in one of the network folders. The code is as shown below: If I change the path from "Y:\Activity_Log" to "C:\Activity_Log" it is working like a charm. What is the problem if I use Y drive wh...

Visual basic script that control a date format

Hi all, i would like to control a string if is in the dd/mm/yyyy format and if the dd number is between 1 and 31 and if mm is between 1 and 12 Someone can help me? thanks ...

DataGridViewButtonColumn icon

Hi, i am using vb.net 2.0 and i would like to set an icon or image in a DataGridViewButtonColumn. I know the class has no member for it. Anyone has an idea? ...

Retrieving dynamic text from a website in vb.net (VS2008)

Hey guys, i want to be able to retrieve dynamic data from a web page (share prices). I started out by retrieving the html code before i realised that as it is live data, the html code will be of little use. Although i am looking to capture specific data, all i wish to do is process a webpage that i specify which will return the text off ...

Application_Error ignored?

I've put the following code in global.asax <%@ Application Language="VB" %> <script runat="server"> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code, der beim Starten der Anwendung ausgeführt wird. End Sub Sub Application_End(ByVal sender As Object, ByVal e As EventArgs) ' Code, ...

SocketException when consuming Web Service

Hi there, I have a webservice being consumed in the WinForm application. I generated a web service wrapper and invoked a web service method asynchronously. I get following exception in my result completed event handler (the event is raised from within the web service wrapper class). What could be the problem? System.Reflection.Tar...

How to get a base class method return type to be the subclass type?

I have a copy function that I'd like to override in subclasses to return the type of the subclass. Here are my interfaces: Public Interface IBase(Of T) Function Copy() As T End Interface Public Interface ICar Inherits IBase(Of ICar) End Interface Public Interface IToyota Inherits ICar End Interface And here are my classe...

AJAX Cascading Dropdown contents are not being updated correctly on server

Greetings, I'm having an issue with a cascading dropdown not updating correctly server-side. The page I am using has two cascading dropdowns: one for the category of a car [ddlCategory] and one for the colors of a car of a certain category [ddlColor]. There are also two text fields that take dates. The goal of the page is to display an ...

VB.NET LINQ Query: Getting The Sum of All Values For A Specific Structure Member

Greetings: In VB.NET, let's assume I have the following Structure: Public Structure Product Public ItemNo As Int32 Public Description As String Public Cost As Decimal End Structure ... and a Generic List of the Products: Dim ProductsList As New List(Of Product) Dim product1 As New Product With product1 .ItemNo = 10...

Basic questions about Classes, Modules and interaction

I am new to vb.net and very frustrated. Like all good programmers I want to split my code into separate files based on functionality . Some of my code interacts with users via Forms and some interacts with lab equipment behind the scenes (no direct user interaction). Sometimes a user will change something that will impact the lab equi...

Best way to resize form/controls according to resolution?

I was an idiot and designed my VB app on a 17inch monitor in a 1280X1024 resolution completely forgetting about what it would like on another machine. This might be a long shot, but is there an easy way to get the resolution of the users monitor and re-size the controls and form accordingly? Thanks in advance. ...

VB.Net event handler registration for nested linkbutton

Hi All, I have a linkbutton that is nested in a datagrid that is nested in a datalist (yes, very strange, but unfortunately it's part of the site which I cannot change). Essentially I want the linkbutton to fire an event handler that calls Response.Redirect(e.CommandArgument)). In other words, I already have the URL that I want to redir...

My.User.IsAuthenticated bug in WPF

I don't know exactly how to explain it, but here is basically how my problem could be reproduced: Create a WPF Windows Application Project in VB.NET (don't create, just keep reading this, unless you don't believe me...) Click the Window's header to create a Window.Loaded event-handler and to navigate to it. Add the following to the eve...

Problem with function Now() in VB.NET

Hi, The Now() function in VB.NET returns date and time which is different from the system time that I see on the right-bottom on the notification bar. It is 15 hours slower than the system time. Has anyone ever met this problem? I'm using .NET 2.0. Thank you. ...

Configuration system failed to initialize in .NET exe

I have an .NET winforms application(A). I am calling another .NET exe(B) file from the winforms application. When executes, it throws the following error. I haven't kept any configuration file for the second exe file(B). "Configuration system failed to initialize" Please help me. Thanks in Advance ...