|
-
Apr 14th, 2005, 11:53 AM
#1
Thread Starter
Lively Member
SQL Statement Variables In Class Area
Im trying to generate a dataset based on a variable in a SQL statment. I can do it while inside a sub but in the class root i cannot figure out how to do this. The Item In bold is what i would like to have as a variable.. so here is my sample statment
Imports System.Data
Imports System.Data.SqlClient
Public Class DonorDB
Inherits System.Windows.Forms.Form
Dim objConnection As SqlConnection = New SqlConnection("My server connection Bla BLa")
Dim objDataAdapter As SqlDataAdapter = New SqlDataAdapter( _
"SELECT DonorID, Organization, Name" & _
"FROM Donors WHERE Donors.Organization = A VARIABLE " & _
"ORDER BY Name", objConnection)
Dim objDataSet As DataSet
Dim objDataView As DataView
Dim objCurrencyManager As CurrencyManager
Private sub somesub()
Some Function....
End SUb
End Class
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|