Rev 1 | Blame | Compare with Previous | Last modification | View Log | Download
VERSION 5.00Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"Begin VB.Form HDatabaseCaption = "Database van de blok informatie"ClientHeight = 5985ClientLeft = 60ClientTop = 345ClientWidth = 8385LinkTopic = "Form1"ScaleHeight = 5985ScaleWidth = 8385StartUpPosition = 3 'Windows DefaultBegin VB.CommandButton RefreshCaption = "Refresh"Height = 495Left = 240TabIndex = 2Top = 5400Width = 1215EndBegin VB.Data Data1Caption = "Data1"Connect = "Access"DatabaseName = "C:\DataTaker\Historie.mdb"DefaultCursorType= 0 'DefaultCursorDefaultType = 2 'UseODBCExclusive = 0 'FalseHeight = 345Left = 4800Options = 0ReadOnly = 0 'FalseRecordsetType = 1 'DynasetRecordSource = "BlokInfo"Top = 5520Visible = 0 'FalseWidth = 1215EndBegin VB.CommandButton SluitenCaption = "Sluiten"Height = 495Left = 6960TabIndex = 1Top = 5400Width = 1215EndBegin MSDBGrid.DBGrid HistorieDBGridBindings = "Database.frx":0000Height = 5175Left = 240OleObjectBlob = "Database.frx":0014TabIndex = 0Top = 0Width = 7935EndEndAttribute VB_Name = "HDatabase"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalseDim DBS As DataBaseDim RST As Recordset'Dim DBS As New ADODB.Connection'Dim RST As New ADODB.RecordsetPrivate Sub Form_Load()'CompactJetDatabase ("Historie.mdb")'Set DBS = OpenDatabase("Historie.mdb")'Set RST = DBS.OpenRecordset("Blokinfo", dbOpenTable)'SQLconnectionstring = "ODBC;DATABASE=datataker;DSN=datataker;UID=dt2005;PWD="'DBS.CursorLocation = adUseServer'DBS.ConnectionString = SQLconnectionstring'DBS.Mode = adModeShareExclusive'DBS.Open'Set RST = DBS.OpenRecordset("Blokinfo", dbOpenDynaset, dbSeeChanges, dbPessimistic)'Set RST.ActiveConnection = DBS'RST.Open "select * from Blokinfo", DBS, adOpenKeyset, adLockPessimistic, adCmdTextData1.DatabaseName = "Historie.mdb"Data1.RecordSource = "blokinfo"Data1.RefreshHistorieDBGrid.RefreshEnd SubPrivate Sub Form_Unload(Cancel As Integer)RST.CloseSet RST = NothingDBS.CloseSet DBS = Nothing'HistorieDBGrid.DataSource = ""End SubPrivate Sub Refresh_Click()Data1.RefreshHistorieDBGrid.RefreshEnd SubPrivate Sub Sluiten_Click()Unload MeEnd Sub