Visual Basic .NET (VB.NET) is an object-oriented computer programming language that can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft .NET Framework.

learn more… | top users | synonyms

0
votes
0answers
13 views

read a text file & then upload a file from the internet [on hold]

purpose of my code is to upload a small file that contains a stock ticker, company name, and market cap and then use the ticker to grab data from the internet, i cannot get my second file to split ...
6
votes
3answers
233 views

Notify user of upcoming expiration of subscription

Here is some VB code that is part of a major system of apps that I have been asked to maintain, one of the more fun things that I get to do is rewrite some code here and there, I have done a little ...
2
votes
2answers
63 views

Select evenly spaced subset from array [closed]

Say I have an array with 60 Elements, and I want to select 40 elements from this array. The subset should consist of elements with evenly spaced indices. In theory I would need to select every 1.5th ...
5
votes
1answer
30 views

Separating Duplicates from Uniques

I have a MySQL table with a very large data. What I need is to find and separate duplicates from the unique rows Let's say this is my table: ...
6
votes
2answers
89 views

VB.Net Database Access Class

I've recently been asked to make some emergency changes to a legacy application written in VB.Net. I come from a C# background so am not overly familiar with this language, though there are enough ...
6
votes
2answers
146 views

Inversion of an array that contains indices

I have an array of length n that contains numbers from 0 to n-1 in random order. I now want to "inverse" this array to one that where index i corresponds to the location of i in the source array. ...
3
votes
1answer
31 views

System for tracking stock information

Background: I'm designing a system (VB/WinForms) that uses a database(MS SQL Server 2008 R2) to track people, their stock account #'s, which stocks they are investing in, and the payout of those ...
1
vote
1answer
52 views

Selecting from a database into a DataGridView

I have a piece of code which grabs data from an SQL database and displays it in a DataGridView. This code works perfectly fine for me. It has been pointed out to me that the below code is bad ...
6
votes
1answer
46 views

Customized Template Login

While the MVC4 template provided by Microsoft is useful, I feel there are a few scenarios that should be covered to help out users trying to log in. Allow the user to log in with their email address ...
3
votes
2answers
49 views

Handle multiple menu click events in one Sub

I have multiple menus that will change languages in one Sub that will handle multiple events of the menus click, It is working for me right now, I'm just wondering if there is better way to do it... ...
3
votes
2answers
36 views

How to reformat this code so I don't use 'Exit Try' and 'Exit For'?

I use SonarQube to help me try and become a better programmer to program along with 'best-practice' standards. There are business rules when a user is submitting data they enter in a datagridview ...
7
votes
3answers
94 views

Collect and calculate average times from log, then display top 10 longest durations

Here's a novel-length summary of the issue: I'm trying to write a VB.net program to help me collect remote site statistics from system-generated logs, but I'm a little like a carpenter who only knows ...
1
vote
0answers
110 views

Magic 8 ball game [closed]

I'm trying to implement a magic 8 ball game which produces random answers without any GUI. Since I'm a newbie to VB.NET, I might have not written the program up to the coding standards. ...
1
vote
1answer
65 views

How can this Encryption Class be more secure?

How secure is this encryption? Secondly, is there something I could do to "turn it up a notch" and make it 'more' secure? ...
4
votes
2answers
100 views

Efficent way to Query a DB and write to text file - Large Recordset

I have a SQL query that returns a recordset with between 2 and 5 million records and I need to write that to a .csv file. I wrote the following procedure and I'm curious to see if there is a better / ...
1
vote
1answer
148 views

Simple async/await progress bar

In researching the new .NET Async and Await keywords in .NET 4.5, I created a simple example showing how to update a progress bar and a label while an async function is running. I also included how to ...
5
votes
1answer
79 views

Inserting text file rows into an Access DB - Optimizing

How can I improve my inserts? I am trying to speed up the process of inserting all of the rows in my text file into an Access DB. I originally switched to this route because of the size of those text ...
7
votes
3answers
157 views

Calculate a payment due after X age

I have inherited a function which calculates a first payment due after a certain age. Using the function I typically pass in database values to custom calculate certain dates: ...
6
votes
3answers
112 views

Creating new string with only distinct letters

Aim: To have only one of each character on the Return string: ...
3
votes
2answers
168 views

Using SQL with encryption

This is my first project I am doing in VB.NET, and also my first real programming project. There is sensitive data, so I am utilizing Microsoft's Encryption/Decryption class (...
7
votes
1answer
81 views

MySQL in Vb to update every field of every page of a form in the database

I have a VB code here that connects to a MySQL database to update every control on every page of a form in our database. I am told is taking longer than it should to run. Comment 'Setup MySql ...
4
votes
1answer
225 views

Encrypt Using AES

I'm using Microsoft's example for encrypting/decripting a string. In their example, they are using Tripple DES. I'm trying to convert their code to use AES. The modified code, listed below, works. ...
2
votes
1answer
26 views

SQL Look up in a Stored Procedure across three tables

The idea of the below code is that I feed back to a Gridview if the user has permission to view the property otherwise that property is not show. The data is passed in via SessionParameters ...
2
votes
4answers
122 views

Spelling bee test writer

Is there any way I can cut down on code? I'm new to this. ...
3
votes
5answers
644 views

Is there a better, more efficient way than Dictionary(Of Tuple(), MyClass)?

Suppose I have data coming from different sources that tells me information about a large group of stores that has the following (just an example): Necessary to define what store we're dealing with: ...
2
votes
2answers
131 views

Identifying specific players with the kinect?

I have some code below that takes different detected users recognized by the Kinect and assigns them a specific random id range based on the player they are. I use this to grab the x,y coordinates of ...
1
vote
1answer
85 views

Separating presentation/BLL/DAL

I'm new to ASP.Net and up until now my code has worked but has been a mish mash all over the place with no real structure. I'm trying to teach myself how to keep the presentation/BLL/DAL separate so I ...
6
votes
1answer
118 views

How can I improve this Tic-Tac-Toe code?

This program is supposed to be a player VS player Tic-Tac-Toe game. The computer then checks whether you've won, lost, or tied. The code does work, but I don't want it to work through hacking; I want ...
5
votes
6answers
230 views

Most efficient way to validate multiple textboxes against a tolerance value

I have a series of text boxes in a table to gather input as below: The user will input a target and actual value for each measurement point they require. I would then like to validate the actual ...
3
votes
3answers
120 views

Select case string comparison

I have a select case that checks against a string variable. It's starting to get large and I am wondering if there is a better way of doing this? Here is a sample of the ...
2
votes
1answer
57 views

Improving my invoice generator

In this function, the copy (Write XML) is inside, but I want it to be separated from the function. How can I improve this function? ...
2
votes
2answers
146 views

Add item to an Array 2D using LINQ

I've wrote a generic function to add an item to an Array 2D This is what I have: ...
3
votes
1answer
186 views

Encapsulation with a dbParameter class

I am using the DatabaseHelper class to execute SQL statements e.g. ExecuteDataReader, ExecuteDataTable etc. The signature for ExecuteReader is: ...
5
votes
2answers
170 views

Is there a way to make this code faster? Drawing a point on chart is slow

Is there any way to make this work faster? Here is my sample code in vb.net. This adds a point on a chart at mouse position but it is quite slow. ...
3
votes
1answer
90 views

How To Subtract CBOT Grain Prices

I had to calculate the difference between Chicago Board of Trade grain futures prices using VB.net and came up with the following (admittedly clunky) solution. It's a little tricky because CBOT ...
1
vote
1answer
67 views

Manage Case Statement with (Int, long, short, double…)

I have the following case statements that has to be modified to fit these cases: Dec, Double, ...
1
vote
2answers
71 views

Better Way to Show and Hide Items in Project

I have this code snippet below that I am looking for a way to make smaller if possible. Any help or suggestions would be appreciated, thanks! ...
1
vote
1answer
884 views

Better way to populate and save checkboxlist items to the database

I posted this question on stackoverflow and was instructed to post here. I have inherited an application that has code to save and populate values in a asp.net checkboxlist control. The existing code ...
1
vote
1answer
289 views

Adding blank rows for every skipped value in a DataTable

So I have a DataTable that returns results within a month to month range when available. However, when I format the return, I need to still show skipped months as ...
4
votes
2answers
412 views

New to SQLite and am asking for guidance

I'm new to SQLite but have programmed in BASIC (and other languages) for pushing 50 years. Given the sample code extract, please offer suggestions for improvement: ...
1
vote
1answer
67 views

Mixing Fowlers patterns

I am developing a large .NET app. The previous developer used Martin Fowlers Transaction script design pattern. Please see the code below: ...
2
votes
1answer
63 views

Inheritance doesn't seem right

Please take a look at the code below: ...
2
votes
3answers
160 views

VB.NET | SQL Code Cleanup

I don't know how else to form this question. I am trying to teach myself a new language in three weeks. Can you please give me some advice on how to clean my code and make it faster or more reliable? ...
2
votes
1answer
444 views

Screen resolution

I am working with an application that will have sub forms. The primary form opens above the system tray, and on mouse-over, secondary windows will open right next to the primary. When I use the ...
2
votes
1answer
259 views

Generating permutations with repetitions of string

I have written the below code which generates all possible permutations with repetitions of a string. I want to make this program shorter and much faster, but I don't know how to do that. ...
2
votes
2answers
75 views

Objects and instance variables in loops

Is there anything wrong with doing this: ...
3
votes
1answer
2k views

asp.net (vb.net): handling of open database connection and calling shared function from web api

I'm working on an ASP.NET project using VB.NET that uses Dapper and the code as implemented so far runs fine with just me testing. In the example below, Dapper calls a stored proc. But my I am ...
1
vote
1answer
89 views

How do I shorten my code?

I currently have a huge code for regenerating some things in a game a made. The code is very big and I think it can be compressed but I don't know how to do it. This is the code ...