Click here to Skip to main content
15,905,682 members
Home / Discussions / Database
   

Database

 
GeneralRe: Automation Sever cannot create object Pin
Gary Hyslop9-Apr-04 3:04
Gary Hyslop9-Apr-04 3:04 
QuestionHow can I deploy sql server database? Pin
Mahmoud Hossam3-Apr-04 23:50
Mahmoud Hossam3-Apr-04 23:50 
AnswerRe: How can I deploy sql server database? Pin
Michael P Butler4-Apr-04 0:05
Michael P Butler4-Apr-04 0:05 
AnswerRe: How can I deploy sql server database? Pin
Steven Campbell13-Apr-04 9:28
Steven Campbell13-Apr-04 9:28 
GeneralSELECT * Problem Pin
monrobot133-Apr-04 12:58
monrobot133-Apr-04 12:58 
GeneralRe: SELECT * Problem Pin
Colin Angus Mackay3-Apr-04 14:10
Colin Angus Mackay3-Apr-04 14:10 
GeneralRe: SELECT * Problem Pin
monrobot134-Apr-04 13:58
monrobot134-Apr-04 13:58 
GeneralSo many problems! Pin
ErinSue203-Apr-04 2:13
ErinSue203-Apr-04 2:13 
Where do i begin. I am very new to all of this. I have a class using visual studio.net where i have to creat a single record display that shows data one record at a time, on a form. I have to use ADO and SQL. I have the SQL it is:
Sort by Name

SELECT Customer.CustomerId, Customer.LastName, Customer.FirstName
FROM Customer
ORDER BY Customer.LastName, Customer.FirstName;


Non Zero Balance

SELECT Customer.LastName, Customer.FirstName, Customer.Balance
FROM Customer
WHERE (((Customer.Balance)>0))
ORDER BY Customer.LastName, Customer.FirstName;

Select by State

SELECT Customer.CustomerId, Customer.LastName, Customer.FirstName,
Customer.State
FROM Customer
WHERE (((Customer.State)=[@WhatState]))
ORDER BY Customer.LastName, Customer.FirstName DESC;


Sum Balance

SELECT DISTINCTROW Sum(Customer.Balance) AS SumBalance
FROM Customer;


Insert customer

INSERT INTO Customer ( LastName, FirstName, Balance )
VALUES ([@newlast], [@newfirst], [@newbalance

I also have my form code which is

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
Me.MenuItem4 = New System.Windows.Forms.MenuItem
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2, Me.MenuItem3, Me.MenuItem4})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "Exit"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.Text = "Customers"
'
'MenuItem3
'
Me.MenuItem3.Index = 2
Me.MenuItem3.Text = "MasterDetail"
'
'MenuItem4
'
Me.MenuItem4.Index = 3
Me.MenuItem4.Text = "StateQuery"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 206)
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Form1"

End Sub

#End Region

Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click

End Sub

Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click

End Sub

Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click

End Sub

Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click

End Sub
Private Sub Exit_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click

' Exit the Application
Application.Exit()

End Sub
Private Sub MenuItem2_Click_(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click

Dim myform As New Customers
myform.ShowDialog()



End Sub
Private Sub MenuItem3_Click_(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
Dim myForm As New MasterDetail
myForm.ShowDialog()

End Sub
Private Sub MenuItem4_Click_(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem34.Click
Dim myForm As New StateQuery
myForm.ShowDialog()

End Sub
End Class

The file i am getting the information for the table to display the records is customer.mdb. From what i gather I think i have to change the button event to be something like me.bindingtxt(customer.mdb,"customer"). Is that right? I won't post my next question until i get a response, this one's long enough!
-ErinSue
GeneralRe: So many problems! Pin
Michael P Butler4-Apr-04 0:24
Michael P Butler4-Apr-04 0:24 
Generalado, ms sql server 'text' columns Pin
sstoyan2-Apr-04 10:18
sstoyan2-Apr-04 10:18 
GeneralRe: ado, ms sql server 'text' columns Pin
Mike Dimmick2-Apr-04 11:42
Mike Dimmick2-Apr-04 11:42 
GeneralRe: ado, ms sql server 'text' columns Pin
sstoyan3-Apr-04 21:38
sstoyan3-Apr-04 21:38 
GeneralRe: ado, ms sql server 'text' columns Pin
Mike Dimmick5-Apr-04 1:53
Mike Dimmick5-Apr-04 1:53 
GeneralRe: ado, ms sql server 'text' columns Pin
sstoyan5-Apr-04 8:39
sstoyan5-Apr-04 8:39 
GeneralDatabase connection problem Pin
cyonite2-Apr-04 4:29
cyonite2-Apr-04 4:29 
GeneralRe: Database connection problem Pin
Mike Dimmick2-Apr-04 5:32
Mike Dimmick2-Apr-04 5:32 
GeneralRe: Database connection problem Pin
cyonite2-Apr-04 6:20
cyonite2-Apr-04 6:20 
GeneralRe: Database connection problem Pin
RichC4-Apr-04 14:35
RichC4-Apr-04 14:35 
GeneralHierarchical structure in ADO.Net Pin
P I2-Apr-04 4:07
P I2-Apr-04 4:07 
GeneralRe: Hierarchical structure in ADO.Net Pin
John Kuhn2-Apr-04 15:55
John Kuhn2-Apr-04 15:55 
GeneralDate format Pin
Xander802-Apr-04 3:50
Xander802-Apr-04 3:50 
GeneralRe: Date format Pin
Mike Dimmick2-Apr-04 5:34
Mike Dimmick2-Apr-04 5:34 
GeneralLimiting a text field Pin
monrobot131-Apr-04 9:10
monrobot131-Apr-04 9:10 
GeneralStored Proc Newbie Pin
quilkin1-Apr-04 6:26
quilkin1-Apr-04 6:26 
GeneralRe: Stored Proc Newbie Pin
Colin Angus Mackay1-Apr-04 6:58
Colin Angus Mackay1-Apr-04 6:58 

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.