Problem sa VB
Prikazujem rezultate 1 do 4 od 4

Tema: Problem sa VB

  1. #1
    Zainteresovan član MatrixNeo (avatar)
    Učlanjen
    08.04.2004.
    Pol
    muški
    Lokacija
    Negdje u masi
    Poruke
    115
    Reputaciona moć
    52

    Podrazumevano Problem sa VB

    E ovako, napravio sam bazu u access-u i u vb formu za tu bazu. Taj program treba da upisuje podatke u tu bazu. Na mom racunaru radi,medjutim kada narezem na cd i iskopiram na drugi racunar kada popunim formu i kliknem da te podatke zapise u bazu izbaci mi gresku " Object variable or with block not set".
    Evo i koda pa ako neko zna u cemu je problem neka napise.
    Unapred hvala.

    Private Sub Form_Unload(Cancel As Integer)
    Screen.MousePointer = vbDefault
    End Sub

    Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
    'This is where you would put error handling code
    'If you want to ignore errors, comment out the next line
    'If you want to trap them, add code here to handle them
    MsgBox "Data error event hit err:" & Description
    End Sub

    Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
    'This will display the current record position for this recordset
    datPrimaryRS.Caption = "Record: " & CStr(datPrimaryRS.Recordset.AbsolutePosition)
    End Sub

    Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
    'This is where you put validation code
    'This event gets called when the following actions occur
    Dim bCancel As Boolean

    Select Case adReason
    Case adRsnAddNew
    Case adRsnClose
    Case adRsnDelete
    Case adRsnFirstChange
    Case adRsnMove
    Case adRsnRequery
    Case adRsnResynch
    Case adRsnUndoAddNew
    Case adRsnUndoDelete
    Case adRsnUndoUpdate
    Case adRsnUpdate
    End Select

    If bCancel Then adStatus = adStatusCancel
    End Sub

    Private Sub cmdAdd_Click()
    On Error GoTo AddErr
    datPrimaryRS.Recordset.AddNew

    Exit Sub
    AddErr:
    MsgBox Err.Description
    End Sub

    Private Sub cmdDelete_Click()
    On Error GoTo DeleteErr
    With datPrimaryRS.Recordset
    .Delete
    .MoveNext
    If .EOF Then .MoveLast
    End With
    Exit Sub
    DeleteErr:
    MsgBox Err.Description
    End Sub

    Private Sub cmdRefresh_Click()
    'This is only needed for multi user apps
    On Error GoTo RefreshErr
    datPrimaryRS.Refresh
    Exit Sub
    RefreshErr:
    MsgBox Err.Description
    End Sub

    Private Sub cmdUpdate_Click()
    On Error GoTo UpdateErr

    datPrimaryRS.Recordset.UpdateBatch adAffectAll
    Exit Sub
    UpdateErr:
    MsgBox Err.Description
    End Sub

    Private Sub cmdClose_Click()
    domaci.Hide
    Form1.Show
    End Sub
    Ma mozes ti meni znas sta
    Pucaj sebi u glavu



  2. #2
    Primećen član Login Killer (avatar)
    Učlanjen
    07.11.2004.
    Lokacija
    LOGIN KILLER OFF.
    Poruke
    869
    Reputaciona moć
    0

    Podrazumevano Re: Problem sa VB

    Kod je u redu.(barem koliko sam pregledao)
    Problem u tome je sto u tom kompu nema nekih potrebnih ocx kontrola.
    Evo i resenja.
    Ides na start pa na ALL PROGAMS pa na Microsoft Visual Studio 6.0 pa na Microsoft Visual Studio 6.0 Tools pa na Package & Deployment Wizard.
    Pa ides na Browse i nadjes projekat Pa ok.
    Sad uzimas Package, Compile.
    Za ostalo se snadji jer nemam vise sati na nalogu.

  3. #3
    Zainteresovan član MatrixNeo (avatar)
    Učlanjen
    08.04.2004.
    Pol
    muški
    Lokacija
    Negdje u masi
    Poruke
    115
    Reputaciona moć
    52

    Podrazumevano Re: Problem sa VB

    Hvala na pomoci, rijesio sam problem nije bila u redu putanja do baze pa zato i nije zapisivao podatke u bazu. Pozdrav
    Ma mozes ti meni znas sta
    Pucaj sebi u glavu

  4. #4
    Primećen član Login Killer (avatar)
    Učlanjen
    07.11.2004.
    Lokacija
    LOGIN KILLER OFF.
    Poruke
    869
    Reputaciona moć
    0

    Podrazumevano Re: Problem sa VB

    Nema na cemu.

Slične teme

  1. Problem sa Flash playerom ili moguci Java problem.
    Autor Psyduck u forumu Internet
    Odgovora: 0
    Poslednja poruka: 24.01.2009., 11:52
  2. problem sa boot-ovima - GRUB4DOS problem
    Autor twix u forumu Unix / Linux Operativni sistemi
    Odgovora: 0
    Poslednja poruka: 09.12.2008., 20:53
  3. problem - komp mi radi usporeno - problem
    Autor VisionOfDisorder u forumu Hardver
    Odgovora: 11
    Poslednja poruka: 28.07.2005., 01:15
  4. Html problem je resen. Vb problem jos nije resen!
    Autor E537A6 u forumu Programiranje
    Odgovora: 0
    Poslednja poruka: 08.02.2005., 22:45
  5. Problem bio,problem resen.
    Autor Leka u forumu Softver
    Odgovora: 0
    Poslednja poruka: 11.03.2004., 23:10

Pravila za slanje poruka

  • Ne možete kreirati novu temu
  • Ne možete poslati odgovor
  • Ne možete dodati priloge
  • Ne možete prepraviti svoju poruku
  •