PC Review


Reply
Thread Tools Rate Thread

How to build sqlConnection class in VB.NET for window applications

 
 
Loi Tan Vo
Guest
Posts: n/a
 
      4th Aug 2004
Hi All

I have tested this property. But it doesn't work
This property reads from configuration file app.config

Public Class DbAccess
Shared ReadOnly Property ConnString() As String
Get
Dim strConnection As String
strConnection =
System.Configuration.ConfigurationSettings.AppSettings.GetValues("SQLConnString")
Return strConnection
End Get
End Property
End Class

Some boby can figure out what wrong it is?
Thanks in advance

- Loi -
 
Reply With Quote
 
 
 
 
Greg Burns
Guest
Posts: n/a
 
      4th Aug 2004
Try
System.Configuration.ConfigurationSettings.AppSettings("SQLConnString")

HTH,
Greg

"Loi Tan Vo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All
>
> I have tested this property. But it doesn't work
> This property reads from configuration file app.config
>
> Public Class DbAccess
> Shared ReadOnly Property ConnString() As String
> Get
> Dim strConnection As String
> strConnection =
>

System.Configuration.ConfigurationSettings.AppSettings.GetValues("SQLConnStr
ing")
> Return strConnection
> End Get
> End Property
> End Class
>
> Some boby can figure out what wrong it is?
> Thanks in advance
>
> - Loi -



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SqlConnection.InfoMessage - SqlError.Class wrong value ? Stephen Ahn Microsoft ADO .NET 1 23rd Aug 2007 06:38 PM
How to build several SqlCommands on one SqlConnection? Jason Huang Microsoft C# .NET 1 22nd Jan 2006 08:55 AM
Admin Access to SQLConnection class =?Utf-8?B?bWFyY21j?= Microsoft VB .NET 2 8th Aug 2005 01:56 PM
Disposing a SqlConnection class resource CEO Gargantua Microsoft ADO .NET 3 20th Jan 2005 07:45 PM
Re: reference to a sqlConnection object fromone class to another. Ignacio Machin Microsoft C# .NET 0 8th Jul 2003 02:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:26 PM.