vb.net

Checking if OLEDB returned a result from SELECT statement (VB.NET)

In my .NET application I have to get results from a MS Access database. I would like to add error checking to make sure a row was returned from my SELECT statement. How can I make sure a result was returned? Thank you. ...

Creating global variables in asp.net using C#

I was working on window appication previously where i used to create global variables using modules in vb.net, but i found that in C# there is no concept of modules. so how can i create global vaiables in C# ...

.Net references not appering in Winforms application

I have a 3 tier applicaiton, winforms, business and data layers. I just pulled the projects out of souce control. My winforms application references business which references data. I added a reference to my business layer and my winforms project is not seeing the reference. "Names or type specified in the Imports . . . doesn't conta...

vb.net .aspxauth

I am working with a large site trying to implement web parts for particular users in a particular subdirectory but I can't get the .ASPXAUTH cookie to be recognized. I've read dozens of tutorials and MS class library pages that tell me how it should work to no avail. I am brand new to Web parts, so I'm sorry if I'm unclear. The idea is ...

Something like viewstate and session

The problem that I am having is as follows: I currently have a custom class that generates buttons and places them on a placeholder on a master page. The events for these buttons put specific values into session that differs values for a database query. In essence, the buttons serve as filters for charts. After creating all the button...

How to save image to application path and retrieve from application path

I have one project and in this project I want to save picture to application path and save the path to database as string and retrieve the image from the application path. Can u give me some idea about it... i am using vb.net as frontend and ms access database ...

Can I do a Where Clause on this LINQ Query?

Dim dataContext As New ACSLostFoundEntities() Dim query = From s In dataContext.FosterForms() _ Join c In dataContext.Fosters() _ On c.License Equals s.License _ Where s.Deleted = "False" _ Select New With {.License = s.License, _ .LastName = s.LastName, _ ...

How to handle this Multithread situation and don't lock?

Hello, I have this situation: a Form with a System.Timer in it (with AutoReset = False). The form has its main thread and the timer its own thread too (nothing new here). When the user press a button I need to stop the timer, wait until the timer thread has stopped its execution and do something more. On the other side, the timer upd...

Override Events in VB.NET

Hello I would like to shadow/override an event in VB.NET. I do it only because I have to implement in this object an interface, that contains the same event like the base object itself, and I need to keep this base event as is it without modification nor supplementary event additions. How can I do it? Public Shadows Event VisibleCha...

Help retrieving attachments from a lotus notes email using notes api and vb.net

I am trying to retrieve an attachment from a lotus notes email using the EmbeddedObjects array off of a NotesDocument object. In my test, I've set up an email with an attachment and am trying to process it. The HasEmbedded property of the NotesDocument object is returning true however the EmbeddedObjects array of the NotesDocument obje...

Visual basic .net 2008 Deployment

Is it possible to make a setup and deployment project in VB.net 2008, every site i have looked at on google says to just select it from the project list. It isnt in the project list for me to select. Are these types of projects not available in the express version? How can I make an installer, other than using one of the setup and deploy...

Getting a list of users on a network domain

I want to get back to get a list of users on a network domain using VB.Net. I will have the domain name available to me for use. Thanks in advance. ...

Does anyone know of a way to view all compiler warnings for a VB.NET project?

VB.NET has this rather annoying limitation which caps compiler warnings reported at 100. vbc : warning BC42206: Maximum number of warnings has been exceeded. This makes things rather frustrating when trying to size up the amount of effort that would be required to comply with VB.NET best practices, such as enabling Option Strict. Is ...

Does this code prevent SQL injection?

Background I've been contracted to analyze an existing Data Provider and I know the following code is faulty; but in order to point out how bad it is, I need to prove that it's susceptible to SQL injection. Question What "Key" parameter could break the PrepareString function and allow me to execute a DROP statement? Code Snippet P...

XML Deserialization Not Setting Class Values

I am not seeing what I am doing wrong. To see what was being done, I changed the constructor values to "TEST", after the XML gets read in (I verified what the XML is), the class values are still stuck to "TEST". Any more Ideas? I am doing this process already in another class that works fine, neither me nor some co-workers could find the...

Get Rid of Error Message - VB.NET

Hey guys, When I do the try/catch method in my vb.net project I will try the code I want and when it can't do it, i make a message box right after the catch method. The thing is that it will show the message box, and then another message from the program itself. Like for example, I have here a MySQLException, and when i click ok on the ...

Extracting strings in .NET

I have a string that looks like this: var expression = @"Args("token1") + Args("token2")"; I want to retrieve a collection of strings that are enclosed in Args("") in the expression. How would I do this in C# or VB.NET? ...

LINQ vs datasets - performance hit?

I am refactoring an existing VB.NET application to use Linq. I've been able to successfully get it to work, but it takes ages (over a minute) on the client machine! They have lots of rows in the database table, but the old version of the programme on the same machine (which uses Datasets) takes 5 seconds. My Linq queries are pretty st...

Crystal Reports error: cannot find CrystalDecisions.Windows.Forms version 10.2.3600

I am refactoring an old program to use VS2008 (instead of VS2005) and the 2003 Crystal Reports merge modules no longer work on the client machine. I am using the CR version bundled with VS2008. Neither the CR10 merge modules downloaded from the SAP site work, nor the CR x86 msi. Could not load file or assembly 'CrystalDecisions.Windo...

VB.net Overridable property not same as c# Virtual property?

Well its simple here you have my vb.net code: Public Class Class1 Public Overridable ReadOnly Property Name() As String Get Return Nothing End Get End Property End Class Public Class Class2 Inherits Class1 Public Overloads ReadOnly Property Name() As String Get Return "Cla...