Click here to Skip to main content
15,918,243 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to enable the both vertical/horizontal scroll bars? Pin
Dave Kreskowiak31-Aug-04 5:19
mveDave Kreskowiak31-Aug-04 5:19 
AnswerRe: How to enable the both vertical/horizontal scroll bars? Pin
Mekong River31-Aug-04 5:19
Mekong River31-Aug-04 5:19 
GeneralRe: How to enable the both vertical/horizontal scroll bars? Pin
Dave Kreskowiak31-Aug-04 6:18
mveDave Kreskowiak31-Aug-04 6:18 
GeneralRe: How to enable the both vertical/horizontal scroll bars? Pin
Mekong River31-Aug-04 6:54
Mekong River31-Aug-04 6:54 
GeneralRe: How to enable the both vertical/horizontal scroll bars? Pin
Dave Kreskowiak31-Aug-04 7:33
mveDave Kreskowiak31-Aug-04 7:33 
GeneralChoosing a file Pin
Mega131-Aug-04 2:58
Mega131-Aug-04 2:58 
GeneralRe: Choosing a file Pin
Purple Monk31-Aug-04 3:05
Purple Monk31-Aug-04 3:05 
GeneralRe: Choosing a file Pin
Mega131-Aug-04 3:17
Mega131-Aug-04 3:17 
Here is a snipit of the code. I can e-mail the source file to you if you supply me with an e-mail address. Also, when looking at the code, it is fairly simple. Most of the work is done with an (odbdataadapter).

Public Class frmUPS
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 OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter
Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
Friend WithEvents txtOENum As System.Windows.Forms.TextBox
Friend WithEvents btnExecute As System.Windows.Forms.Button
Friend WithEvents lblOENum As System.Windows.Forms.Label
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents Dsups1 As UPS.dsups
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmUPS))
Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter
Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection
Me.txtOENum = New System.Windows.Forms.TextBox
Me.btnExecute = New System.Windows.Forms.Button
Me.lblOENum = New System.Windows.Forms.Label
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.Dsups1 = New UPS.dsups
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Dsups1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'OleDbDataAdapter1
'
Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
Me.OleDbDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "calPackage", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("Sm_referenceText0", "Sm_referenceText0"), New System.Data.Common.DataColumnMapping("Sm_trackingNo", "Sm_trackingNo")})})
'
'OleDbSelectCommand1
'
Me.OleDbSelectCommand1.CommandText = "SELECT Sm_referenceText0, Sm_trackingNo, m_foreignKey FROM calPackage WHERE (m_is" & _
"PkgVoid = 0) AND (Sm_referenceText0 = ?) ORDER BY m_foreignKey DESC"
Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
Me.OleDbSelectCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Sm_referenceText0", System.Data.OleDb.OleDbType.VarWChar, 35, "Sm_referenceText0"))
'
'OleDbConnection1
'
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=0;Jet OLEDB:Database Password=;Data Source=""C:\upsdb.mdb"";Password=;" & _
"Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Microsoft" & _
".Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properti" & _
"es=;Mode=Read;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=" & _
"False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Rep" & _
"lica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False"
'
'txtOENum
'
Me.txtOENum.Location = New System.Drawing.Point(172, 40)
Me.txtOENum.Name = "txtOENum"
Me.txtOENum.Size = New System.Drawing.Size(96, 20)
Me.txtOENum.TabIndex = 0
Me.txtOENum.Text = "Order Number"
'
'btnExecute
'
Me.btnExecute.Location = New System.Drawing.Point(184, 280)
Me.btnExecute.Name = "btnExecute"
Me.btnExecute.Size = New System.Drawing.Size(72, 24)
Me.btnExecute.TabIndex = 1
Me.btnExecute.Text = "E&xecute"
'
'lblOENum
'
Me.lblOENum.Location = New System.Drawing.Point(172, 16)
Me.lblOENum.Name = "lblOENum"
Me.lblOENum.Size = New System.Drawing.Size(96, 16)
Me.lblOENum.TabIndex = 3
Me.lblOENum.Text = "Order Number"
'
'DataGrid1
'
Me.DataGrid1.DataMember = ""
Me.DataGrid1.DataSource = Me.Dsups1.calPackage
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(16, 88)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.PreferredColumnWidth = 125
Me.DataGrid1.ReadOnly = True
Me.DataGrid1.Size = New System.Drawing.Size(416, 184)
Me.DataGrid1.TabIndex = 4
'
'Dsups1
'
Me.Dsups1.DataSetName = "dsups"
Me.Dsups1.Locale = New System.Globalization.CultureInfo("en-US")
'
'frmUPS
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(440, 318)
Me.Controls.Add(Me.DataGrid1)
Me.Controls.Add(Me.lblOENum)
Me.Controls.Add(Me.btnExecute)
Me.Controls.Add(Me.txtOENum)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.Name = "frmUPS"
Me.Text = "UPS Tracking # Retreiver"
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Dsups1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub btnExecute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExecute.Click
' The following line passes the value the user enters for the OE Number.
OleDbDataAdapter1.SelectCommand.Parameters("Sm_referenceText0").Value = txtOENum.Text
Dsups1.Clear()
OleDbDataAdapter1.Fill(Dsups1)


End Sub




End Class
GeneralRe: Choosing a file Pin
Mekong River31-Aug-04 15:16
Mekong River31-Aug-04 15:16 
GeneralRichtxt Adding Line by line Pin
YK Prakash31-Aug-04 2:19
YK Prakash31-Aug-04 2:19 
GeneralRe: Richtxt Adding Line by line Pin
Dave Kreskowiak31-Aug-04 4:07
mveDave Kreskowiak31-Aug-04 4:07 
GeneralRe: Richtxt Adding Line by line Pin
YK Prakash4-Sep-04 0:35
YK Prakash4-Sep-04 0:35 
GeneralCreating a directory programmatically Pin
beowulfagate30-Aug-04 23:53
beowulfagate30-Aug-04 23:53 
GeneralRe: Creating a directory programmatically Pin
Purple Monk31-Aug-04 1:34
Purple Monk31-Aug-04 1:34 
GeneralRe: Creating a directory programmatically Pin
Purple Monk31-Aug-04 1:43
Purple Monk31-Aug-04 1:43 
GeneralRe: Creating a directory programmatically Pin
progload31-Aug-04 8:44
progload31-Aug-04 8:44 
GeneralCustom controls Pin
MrMickeyDeeGimp30-Aug-04 22:13
MrMickeyDeeGimp30-Aug-04 22:13 
GeneralRe: Custom controls Pin
Dave Kreskowiak31-Aug-04 5:15
mveDave Kreskowiak31-Aug-04 5:15 
GeneralPrint to file Pin
r i s h a b h s30-Aug-04 20:41
r i s h a b h s30-Aug-04 20:41 
GeneralRe: Print to file Pin
Dave Kreskowiak31-Aug-04 4:00
mveDave Kreskowiak31-Aug-04 4:00 
GeneralRichTextBox Pin
syedusman30-Aug-04 19:58
syedusman30-Aug-04 19:58 
GeneralGenerate errorlevel code Pin
sybux200030-Aug-04 19:46
sybux200030-Aug-04 19:46 
GeneralRe: Generate errorlevel code Pin
Colin Angus Mackay30-Aug-04 23:23
Colin Angus Mackay30-Aug-04 23:23 
GeneralRe: Generate errorlevel code Pin
sybux200031-Aug-04 4:45
sybux200031-Aug-04 4:45 
GeneralRe: Generate errorlevel code Pin
Colin Angus Mackay31-Aug-04 5:03
Colin Angus Mackay31-Aug-04 5:03 

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.