Blog Feed: Visual Basic Source Code Sample, Visual Basic Programming Sample, Visual Basic Training, Free Visual Basic Source Cod..
| Home | My Account | Directories |
Connection Strings for SQL Server 2000 and 7.0
Published on 2011-06-29 02:51:00
.NET Framework Data Provider for SQL Server Standard Security Data Source=ServerName;Initial Catalog=DatabaseName;User Id=UserName;Password=Password; Standard Security alternative syntax Server=ServerName;Database=DatabaseName;User ID=UserName;Passw > read more
ADO Control to create Database Table using Visual Basic
Published on 2011-04-07 07:31:00
'Using ADO control to create a database table from Visual Basic'Connect to the database file and use the Connection object's Execute method to 'execute an SQL CREATE TABLE statement. Private Sub BtnCreate_Click() Dim db_file As Stri > read more
Password Generator in Visual Basic
Published on 2011-04-01 10:28:00
'A sample visual code on how to generate a best random password generator Public Function GeneratePassword(ByVal lngLength As Long) _ As StringOn Error GoTo Err_Proc Dim iChr As Integer Dim c As Long Dim strResult As Strin > read more
Connect Oracle Database using Visual Basic
Published on 2011-03-24 07:27:00
'How to connect Oracle Database from Visual Basic'Sample code and connection strings to connect Oracle using Visual Basic: Dim conn As ADODB.Connection ' Open a Conn_Dataection using Oracle ODBC.Set Conn_Data = New ADODB.ConnectionConn_Data.Connectio > read more
How to Use ADO Object to get data from a read only MS Access database
Published on 2011-03-22 07:21:00
'How to Use ADO object to get data from a read-only MS Access database'In the ConnDataect string, set Mode to Read. Dim ConnData As ADODB.Connection ' Open a ConnDataection.Set ConnData = New ADODB.ConnectionConnData.ConnectionString = "Provider=Micr > read more
How to Copy data from an Access database and save in Excel spreadsheet
Published on 2011-03-20 12:31:00
'How to Copy data from an Access database into an Excel spreadsheet'Use ADO object to open the database. Using Excel as a server, open the spreadsheet.'Read the field names from the ADO Recordset data and add them to the first row in'the spreadsheet > read more
How to Use ADO object and populate result in a ListBox object
Published on 2011-03-20 12:28:00
Database - How to Use ADO to populate a ListBox Obkect with data values'Open a Recordset that selects the desired information. Loop through the records and put the values to the ListBox. Dim statement As StringDim Conn_Data As ADODB.ConnectionDim rs_ > read more
Sample Code on How to Fill the Datagrid View in Visual Basic.Net
Published on 2011-03-20 09:32:00
Sample on how to Fill the Datagrid View in Visual Basic .Net 'Here's the code below. Dim query as string="Select * from EmployeeTable" Dim da as new oledbdataadapter(query,con) dim ds as new dataset da.fill(ds,"EmployeeTable") me.dgv.datasource= > read more
Visual Basic SQL Select Statemnt
Published on 2011-03-20 09:16:00
The SELECT statement is used to select data from a database. The result is stored in a result table, called the result-set.SQL SELECT Syntax is This statement select only one column of the database field. SELECT column_name(s) FROM tabl > read more
How to load the values of a recordset in a combo box object
Published on 2011-03-20 07:04:00
'How to load the values of a recordset in a combo box object Public Sub FillData_ListBox(ByRef lstControl As Object, ByRef strQry As String) 'this routine is used to fill up a list box by passing 'the lstbox name and &nb > read more
Sample on how to create and call a stored procedure.
Published on 2011-03-19 07:02:00
'How to create and call a stored procedure.Dim conn As ADODB.ConnectionDim rst As ADODB.Recordset CREATE PROCEDURE ProcEmployees AsBegin declare @Empcount as int   > read more
How to Connect to a database using ADO type and retrieving the data.
Published on 2011-03-18 06:58:00
'How to Connect to a database using ADO and retrieving the data.'Create a reference to 'Microsoft ActiveX Data Object 2.0 Library' Private Sub Form_Load() 'Declare the connection and recordset objects Dim cnData As > read more
How to Bind Text Boxes to an ADO Recordset during run time.
Published on 2011-03-18 06:43:00
'Sample on How to Bind TextBoxes to an ADO Recordset at run time'Open the ADO Connection and the Recordset to fetch the data. Set the TextBox's'DataSource properties to the Recordset. Set their DataField properties to the'names of the Recordset's fie > read more
How to Load a Form Dynamically in Visual Basic .Net
Published on 2010-06-07 07:39:00
Once you know the name of the DLL and the name of the form you want to show, the rest is quite simple. You create an instance of the form, using the Assembly.CreateInstance method, and then call the Show method on the form. The following code sni > read more
Visual Basic 6 - How to Hide Application in Windows Task List
Published on 2010-05-18 07:37:00
This code will hide your application in windows tasklist using visual basic when user press the ctr + alt + delete in keyboard. This type of program is very useful if you don't want your users/clients to close the application through windows tasklist > read more
How to Create a Hot Key In Visual Basic 6
Published on 2010-05-18 07:36:00
What is a Hot Key Control A hot key is a key combination that the user can press to perform an action quickly. For example, a user can create a hot key that activates a given window and brings it to the top of the z-order. The hot key control display > read more
System API Programming
Published on 2010-04-27 11:22:00
Visual Basic 6 - API Programming on how to get computer name 'Get Computer Name Declare Function SetComputerName Lib "kernel32" _ Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long Private Sub cmdChange_Click() SetComputerName txtNe > read more
Using ADO Record Source
Published on 2010-04-27 11:15:00
Code on how to use ado record source in visal basic .net Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Create a connection string Dim ConnectionString As String = "Provider=Microsoft.Jet.OL > read more
Multi Threading in Visual Basic.Net
Published on 2010-04-27 11:13:00
'Sample Code on how to use multithreading in Visual Basic .Net Imports SystemImports System.ThreadingPublic Module ThreadSamplePublic Balance As Integer = 1000Sub Main()Dim account As Account = New Account()Dim depositeBalance1 As DepositeBalance = N > read more
How to Connect Database Using ODBC (Object Database Configuration/Connectivity)
Published on 2010-04-11 23:07:00
This ODBC method is applicable to Visual Basic .Net and Visual Basic 6.0 using MS Access Databse (.mdb). Please follow the instructions below on how to setup database. 1. Click Start button, and select Control Panel 2. Once the > read more
SQL Server 2005 Express - For Visual Basic .Net and 6.0
Published on 2010-04-07 22:18:00
The best database server for Microsoft Visual Basic Language is "Microsoft SQL Server" but what's the difference between the Microsoft SQL Server Express and SQL Server. Well, MS SQL Server you need to buy a license from Microsoft Corp > read more
Visual Basic - Synchronize Client Computer Date/Time From a SQL Server
Published on 2010-04-07 12:25:00
The code below is used to synchronize the client computer from MS SQL Server, sometimes the users may change their computer local time in-order to trick the system that he/she encoded the data entry on time. Oh, if you're the database admi > read more
List of SQL Command
Published on 2010-04-07 12:16:00
Hello, These are the list of SQL Commands. I will post samples for these SQL commands so please keep visit this site. Table of Contents ABORT -- abort the current transaction ALTER AGGREGATE -- change the definition of an aggregate function AL > read more