₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,284 members, 8,511,049 topics. Date: Saturday, 31 October 2026 at 05:00 PM

Toggle theme

Vb.net Database Con Help - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Vb.net Database Con Help (1112 Views)

1 Reply

Vb.net Database Con Help by bigafees(op): 11:27am On May 20, 2010
pls N'lander,

I need help on how to connect vb.net to sql server using Oledb or sqlConnection, i have connected it through ADOB, but i want to connect with Library

Pls in a comprehensive way
Re: Vb.net Database Con Help by ABAboi: 10:33am On May 22, 2010
You will need to import the SQLCLIENT/OLEDB name space

Imports System.Data.SqlClient
Public Class LoginForm
Private cs As New SqlConnection("Data Source=DENSMAN-PC\SQLEXPRESS;Initial Catalog=aba;Integrated Security=True"wink ' You can change this to reflect the actual location of your database
End class
Re: Vb.net Database Con Help by Obiakara: 4:33pm On May 27, 2010
'import ur namespace
import system.data
import system.data.sql
import system.data.sqlclient
Dim constr as string="ur connection string"
'when u attach the databae check the properties to get ur 'connection string.
dim sqlcon as new sqlconnection(consrt)

'this should work out. . .
1 Reply

I Need A Help To Write A Simple Login Form Using Vb.net • Vb.net Crystal Report & Dataset • 2 • 3 • 4

The Lucrative Branch • Any Pro In Cobol Programming And System Programming?i Nid Help. • Java With Mysql