Click here to Skip to main content
15,891,033 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.Net/VS.Net Password Login Pin
Dave Kreskowiak5-Oct-04 4:33
mveDave Kreskowiak5-Oct-04 4:33 
GeneralRe: VB.Net/VS.Net Password Login Pin
Desi Bravo5-Oct-04 14:54
Desi Bravo5-Oct-04 14:54 
GeneralRe: VB.Net/VS.Net Password Login Pin
Dave Kreskowiak5-Oct-04 17:09
mveDave Kreskowiak5-Oct-04 17:09 
GeneralRe: VB.Net/VS.Net Password Login Pin
Anonymous6-Oct-04 4:13
Anonymous6-Oct-04 4:13 
Generaldatagrid Pin
Paps24-Oct-04 5:25
Paps24-Oct-04 5:25 
GeneralRe: datagrid Pin
Dave Kreskowiak4-Oct-04 9:07
mveDave Kreskowiak4-Oct-04 9:07 
GeneralRe: datagrid Pin
Anonymous4-Oct-04 10:14
Anonymous4-Oct-04 10:14 
GeneralRe: datagrid Pin
Paps24-Oct-04 11:00
Paps24-Oct-04 11:00 
I tried this code but having a tiny problem:

I get the error @ AddHandler customersDataSet1.Tables("Customers").ColumnChanging, AddressOf Customers_ColumnChanging

any idea?


Imports System.Data
Imports System.Data.OleDb

Inherits System.Windows.Forms.Form
Dim da As New OleDbDataAdapter()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ds As New Data.DataSet()
' Visual Basic
' Assumes the grid is bound to a dataset called customersDataSet1
' with a table called Customers.
' Put this code in the form's Load event or its constructor.
Dim conn As OleDbConnection = New OleDbConnection("Provider = Microsoft.jet.oledb.4.0;Data source = D:\Program files\Microsoft Visual Studio .NET\Crystal Reports\Samples\Database\Xtreme.mdb")
If conn.State <> ConnectionState.Open Then conn.Open()

da.SelectCommand.CommandText = "Select * from customer"
da.SelectCommand.CommandType = CommandType.Text


da.Fill(ds, "customersDataSet1")
DataGrid1.DataSource = ds
DataGrid1.DataMember = "customersDataSet1"
AddHandler customersDataSet1.Tables("Customers").ColumnChanging, AddressOf Customers_ColumnChanging
End Sub

Private Sub Customers_ColumnChanging(ByVal sender As Object, _
ByVal e As System.Data.DataColumnChangeEventArgs)
' Only check for errors in the Product column
If (e.Column.ColumnName.Equals("Product")) Then
' Do not allow "Automobile" as a product.
If CType(e.ProposedValue, String) = "Automobile" Then
Dim badValue As Object = e.ProposedValue
e.ProposedValue = "Bad Data"
e.Row.RowError = "The Product column contians an error"
e.Row.SetColumnError(e.Column, "Product cannot be " & _
CType(badValue, String))
End If
End If
End Sub
GeneralRe: datagrid Pin
Anonymous4-Oct-04 19:20
Anonymous4-Oct-04 19:20 
GeneralRe: datagrid Pin
Anonymous4-Oct-04 21:18
Anonymous4-Oct-04 21:18 
GeneralRe: datagrid Pin
Paps25-Oct-04 3:19
Paps25-Oct-04 3:19 
GeneralRe: datagrid Pin
Paps25-Oct-04 4:19
Paps25-Oct-04 4:19 
GeneralRe: datagrid Pin
Anonymous5-Oct-04 6:52
Anonymous5-Oct-04 6:52 
GeneralRe: datagrid Pin
Paps25-Oct-04 8:10
Paps25-Oct-04 8:10 
GeneralRe: datagrid Pin
Anonymous5-Oct-04 7:11
Anonymous5-Oct-04 7:11 
GeneralRe: datagrid Pin
Paps25-Oct-04 7:38
Paps25-Oct-04 7:38 
GeneralRe: datagrid Pin
Anonymous5-Oct-04 7:55
Anonymous5-Oct-04 7:55 
GeneralRe: datagrid Pin
Anonymous5-Oct-04 11:57
Anonymous5-Oct-04 11:57 
QuestionGetting all availabel information of a computer? Pin
dungle304-Oct-04 0:18
dungle304-Oct-04 0:18 
AnswerRe: Getting all availabel information of a computer? Pin
Dave Kreskowiak4-Oct-04 5:45
mveDave Kreskowiak4-Oct-04 5:45 
GeneralRe: Getting all availabel information of a computer? Pin
dungle305-Oct-04 22:10
dungle305-Oct-04 22:10 
GeneralRe: Getting all availabel information of a computer? Pin
Dave Kreskowiak6-Oct-04 13:13
mveDave Kreskowiak6-Oct-04 13:13 
GeneralRe: Getting all availabel information of a computer? Pin
dungle306-Oct-04 16:38
dungle306-Oct-04 16:38 
GeneralRe: Getting all availabel information of a computer? Pin
Dave Kreskowiak6-Oct-04 17:03
mveDave Kreskowiak6-Oct-04 17:03 
GeneralRe: Getting all availabel information of a computer? Pin
dungle307-Oct-04 18:27
dungle307-Oct-04 18:27 

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.