Click here to Skip to main content
16,005,491 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL error :Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.??? [help] Pin
Mike Dimmick19-Oct-06 6:51
Mike Dimmick19-Oct-06 6:51 
Questionhow to display daily sales between the date? [urgent] Pin
campbells18-Oct-06 18:58
campbells18-Oct-06 18:58 
AnswerRe: how to display daily sales between the date? [urgent] Pin
Edbert P19-Oct-06 15:25
Edbert P19-Oct-06 15:25 
GeneralRe: how to display daily sales between the date? [urgent] Pin
campbells19-Oct-06 15:49
campbells19-Oct-06 15:49 
GeneralRe: how to display daily sales between the date? [urgent] Pin
Edbert P19-Oct-06 16:02
Edbert P19-Oct-06 16:02 
GeneralRe: how to display daily sales between the date? [urgent] Pin
Edbert P19-Oct-06 16:04
Edbert P19-Oct-06 16:04 
GeneralRe: how to display daily sales between the date? [urgent] Pin
campbells19-Oct-06 16:37
campbells19-Oct-06 16:37 
Questionsqlconnection Pin
avahia18-Oct-06 17:53
avahia18-Oct-06 17:53 
please help me !!!?
I have a problem with sqlconnection definition
when I add the sqlconnection from toolbox :
like this:

Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page

Private Sub InitializeComponent()
Me.sqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.sqlConnection1.ConnectionString = "Data Source=server;Initial Catalog=masterstd;User ID=sa"
Me.sqlConnection1.FireInfoMessageEventOnUserErrors = False

End Sub
Private WithEvents sqlConnection1 As System.Data.SqlClient.SqlConnection

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim cmduniversity As SqlCommand
Dim dtruniversity As SqlDataReader
cmduniversity = New SqlCommand("select * from university", sqlConnection1)
sqlConnection1.Open()
dtruniversity = cmduniversity.ExecuteReader
dtruniversity.Close()
sqlConnection1.Close()

End If
End Sub
End Class

in the sqlconnection.open the nullrefrence exception occures but
when i define myself this exception dosn't occure.
like this:

Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page
Private Sub InitializeComponent()


End Sub
Private WithEvents sqlConnection1 As System.Data.SqlClient.SqlConnection

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
sqlConnection1 = New SqlConnection
sqlConnection1.ConnectionString = "Data Source=server;Initial Catalog=masterstd;User ID=sa"
sqlConnection1.FireInfoMessageEventOnUserErrors = False
Dim cmduniversity As SqlCommand
Dim dtruniversity As SqlDataReader
cmduniversity = New SqlCommand("select * from university", sqlConnection1)
sqlConnection1.Open()
dtruniversity = cmduniversity.ExecuteReader
dtruniversity.Close()
sqlConnection1.Close()

End If
End Sub


ava_h
QuestionError I keep getting in my vb program (ADO error) Pin
MichaelDurham18-Oct-06 10:21
MichaelDurham18-Oct-06 10:21 
AnswerRe: Error I keep getting in my vb program (ADO error) Pin
Edbert P19-Oct-06 18:41
Edbert P19-Oct-06 18:41 
GeneralRe: Error I keep getting in my vb program (ADO error) Pin
MichaelDurham24-Oct-06 8:24
MichaelDurham24-Oct-06 8:24 
QuestionSlow performance in .NET? Pin
Xiangyang Liu 刘向阳18-Oct-06 4:10
Xiangyang Liu 刘向阳18-Oct-06 4:10 
AnswerRe: Slow performance in .NET? Pin
Ed.Poore19-Oct-06 13:36
Ed.Poore19-Oct-06 13:36 
GeneralRe: Slow performance in .NET? Pin
Xiangyang Liu 刘向阳20-Oct-06 17:26
Xiangyang Liu 刘向阳20-Oct-06 17:26 
GeneralRe: Slow performance in .NET? Pin
Ed.Poore21-Oct-06 8:04
Ed.Poore21-Oct-06 8:04 
QuestionHow to increase size of database in SQL Server 2000 Pin
prakash_21017-Oct-06 23:24
prakash_21017-Oct-06 23:24 
AnswerRe: How to increase size of database in SQL Server 2000 Pin
Mairaaj Khan18-Oct-06 0:12
professionalMairaaj Khan18-Oct-06 0:12 
GeneralRe: How to increase size of database in SQL Server 2000 Pin
Jerry Hammond18-Oct-06 10:09
Jerry Hammond18-Oct-06 10:09 
QuestionUsing dataset in a client-server application Pin
baxter_dev17-Oct-06 23:11
baxter_dev17-Oct-06 23:11 
AnswerRe: Using dataset in a client-server application Pin
Colin Angus Mackay17-Oct-06 23:17
Colin Angus Mackay17-Oct-06 23:17 
GeneralRe: Using dataset in a client-server application [modified] Pin
baxter_dev17-Oct-06 23:41
baxter_dev17-Oct-06 23:41 
GeneralRe: Using dataset in a client-server application Pin
Ed.Poore19-Oct-06 13:38
Ed.Poore19-Oct-06 13:38 
QuestionHow to make DataSet transparently remoted, or proxied, or called by ref? Pin
vgrigor117-Oct-06 22:37
vgrigor117-Oct-06 22:37 
QuestionSQL Server 2000 Notification Services and .NET 2.0 Pin
asasov17-Oct-06 21:02
asasov17-Oct-06 21:02 
QuestionSaving date time! Pin
Shahzad.Aslam17-Oct-06 19:28
Shahzad.Aslam17-Oct-06 19:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.