VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 300,356 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,939 people online right now. Registration is fast and FREE... Join Now!




problems with vb2005..with microsoft access

 

problems with vb2005..with microsoft access

wongth7

2 Jul, 2009 - 04:03 AM
Post #1

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

hi guys..i have some problem with my VB program..hope u guys can help me out

here's my form
Attached Image



explanation on my program
---------------------------------
the ' << ' and ' >> ' button will browse through records from the database...while the "delete" button will delete the record from the database...
i have no problem browsing through the records from the database and no problem deleting the records with those buttons


but there's some minor problem..
----------------------------------------
problem 1 - when i click on the 'delete' button to delete a record, the data will still appear in the textboxes when i click on the '<<' and '>>' buttons, although the data in the database already been deleted.

problem 2 (same problem related to problem 1) - when i keep clicking on the 'delete' button to delete all the records, the program will then crash and this error message appear 'Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.'..........how to avoid this??

problem 3 - if the database is empty and i log into the form and click on the '<<' , '>>' buttons, the program will then crash and this error message appear 'There is no row at position 1.' ....how to lock those button's when the database is empty or any other ways??



please show me sample codes or something as i will find it hard to understand if you just explain those logic things etc for me


here's my code....

CODE
Private Sub frmUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

       con.ConnectionString = "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source = H:\Testing\Project\user.mdb"
       con.Open()
       sql = "SELECT * FROM Table1"
       da = New OleDb.OleDbDataAdapter(sql, con)
       da.Fill(ds, "Table1List")
       con.Close()
       maxrows = ds.Tables("Table1List").Rows.Count

       txtName.Text = ds.Tables("Table1List").Rows(0).Item(0)
       txtUsername.Text = ds.Tables("Table1List").Rows(0).Item(1)
       txtNickname.Text = ds.Tables("Table1List").Rows(0).Item(2)
       txtPassword.Text = ds.Tables("Table1List").Rows(0).Item(3)
       txtCity.Text = ds.Tables("Table1List").Rows(0).Item(4)
       txtAddress.Text = ds.Tables("Table1List").Rows(0).Item(5)
       txtTown.Text = ds.Tables("Table1List").Rows(0).Item(6)
       txtPostcode.Text = ds.Tables("Table1List").Rows(0).Item(7)

   End Sub

________________________________________________________________________________
________________

Public Sub navigaterecords(ByVal position As Integer)

       txtName.Text= ds.Tables("Table1List").Rows(position).Item(0)
       txtUsername.Text = ds.Tables("Table1List").Rows(position).Item(1)
       txtNickname.Text = ds.Tables("Table1List").Rows(position).Item(2)
       txtPassword.Text = ds.Tables("Table1List").Rows(position).Item(3)
       txtCity.Text = ds.Tables("Table1List").Rows(position).Item(4)
       txtAddress.Text = ds.Tables("Table1List").Rows(position).Item(5)
       txtTown.Text = ds.Tables("Table1List").Rows(position).Item(6)
       txtPostcode.Text = ds.Tables("Table1List").Rows(position).Item(7)

   End Sub

________________________________________________________________________________
_______________

     Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click

       If inc <> maxrows - 1 Then
           inc = inc + 1
           navigaterecords(inc)
       Else
           MessageBox.Show("No more applications!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
       End If

   End Sub  

________________________________________________________________________________
________________


Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click

       If inc <> 0 Then
           inc = inc - 1
           navigaterecords(inc)
       Else
           MessageBox.Show("No more applications!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
       End If

   End Sub
________________________________________________________________________________
__________________


Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click


       con.ConnectionString = "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source = H:\Testing\Project\user.mdb"
       con.Open()
       sql = "SELECT * FROM Table1"
       da = New OleDb.OleDbDataAdapter(sql, con)
       da.Fill(ds, "Table1List")
       con.Close()
       maxrows = ds.Tables("Table1List").Rows.Count

       Dim cb As New OleDb.OleDbCommandBuilder(da)
       Dim intresult As Integer

       intresult = MessageBox.Show("Confirm Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
       If intresult = Windows.Forms.DialogResult.Yes Then
           ds.Tables("Table1List").Rows(inc).Delete()
           da.Update(ds, "Table1List")
           maxrows = maxrows - 1
           inc = 0
           navigaterecords(inc)

       End If


This post has been edited by wongth7: 2 Jul, 2009 - 04:28 AM

User is offlineProfile CardPM
+Quote Post


Luc001

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 04:25 AM
Post #2

D.I.C Head
**

Joined: 4 May, 2009
Posts: 147



Thanked: 12 times
My Contributions
Hi,

Is this the appropriate delete button event?

CODE
Private Sub [size=3]btnDelete_Click[/size](ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [size=3]btnApprove.Click[/size]




This post has been edited by Luc001: 2 Jul, 2009 - 04:27 AM
User is offlineProfile CardPM
+Quote Post

wongth7

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 04:27 AM
Post #3

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

QUOTE(Luc001 @ 2 Jul, 2009 - 04:25 AM) *

Hi,

Is this the appropriate delete button event?

CODE
Private Sub [b]btnDelete_Click[/b](ByVal sender As System.Object, ByVal e As System.EventArgs) [b]Handles btnApprove.Click
[/b]




oh ya..forgot to change tat..cos this is just a sample question from my real program...thanks for telling

anyway..can u help?
User is offlineProfile CardPM
+Quote Post

Luc001

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 04:31 AM
Post #4

D.I.C Head
**

Joined: 4 May, 2009
Posts: 147



Thanked: 12 times
My Contributions
Hi,

I think you can try this:

CODE
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click

If MessageBox.Show("Do you really want to Delete this Record?", _
"Delete", MessageBoxButtons.YesNo, _
MessageBoxIcon.Warning) = Windows.Forms.DialogResult.No Then


MsgBox("Operation Cancelled")
Exit Sub

End If
Dim cb As New OleDb.OleDbCommandBuilder(da)

ds.Tables("TableList").Rows(inc).Delete()
MaxRows = MaxRows - 1

inc = 0
NavigateRecords()
da.Update(ds, "TableList")


End sub


This post has been edited by Luc001: 2 Jul, 2009 - 04:37 AM
User is offlineProfile CardPM
+Quote Post

CamoDeveloper

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 04:39 AM
Post #5

D.I.C Head
Group Icon

Joined: 12 Jun, 2009
Posts: 204



Thanked: 12 times
Dream Kudos: 200
My Contributions
A little suggestion, you should create some variables that equal the database results, so you won't have to keep re-writing all of that code again.

For your problem one and two, you should re-bind the data to the form so the correct data is shown. When the form first loads, it gets all the data from the database and binds it to the form.

As for your problem three, you should check to see if the field is empty before trying to display from the database. Something like this :
CODE

If Not ds.Tables("Table1List").Rows(0).Item(0) Is Nothing Then
  Me.txtAddress.Text = ds.Tables("Table1List").Rows(0).Item(0)
End If


Hope this helps.

~Camo
User is offlineProfile CardPM
+Quote Post

wongth7

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 04:41 AM
Post #6

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

QUOTE(Luc001 @ 2 Jul, 2009 - 04:31 AM) *

Hi,

I think you can try this:

CODE
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click

If MessageBox.Show("Do you really want to Delete this Record?", _
"Delete", MessageBoxButtons.YesNo, _
MessageBoxIcon.Warning) = Windows.Forms.DialogResult.No Then


MsgBox("Operation Cancelled")
Exit Sub

End If
Dim cb As New OleDb.OleDbCommandBuilder(da)

ds.Tables("TableList").Rows(inc).Delete()
MaxRows = MaxRows - 1

inc = 0
NavigateRecords()
da.Update(ds, "TableList")


End sub



hi bro, i tried to run your code and this error message pop out....'Deleted row information cannot be accessed through the row.'
the data cant be deleted from the database too ..
User is offlineProfile CardPM
+Quote Post

CamoDeveloper

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 05:40 AM
Post #7

D.I.C Head
Group Icon

Joined: 12 Jun, 2009
Posts: 204



Thanked: 12 times
Dream Kudos: 200
My Contributions
Here is a full example of what I was trying to explain earlier, I don't know if it works since I can't test the code so it might need some tweaking.
CODE

Private Sub frmUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.BindData()
    End Sub

    Public Sub BindData()
        con.ConnectionString = "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source = H:\Testing\Project\user.mdb"
        con.Open()
        Sql = "SELECT * FROM Table1"
        da = New OleDb.OleDbDataAdapter(Sql, con)
        da.Fill(ds, "Table1List")
        con.Close()
        maxrows = ds.Tables("Table1List").Rows.Count

        Dim Name As String = ds.Tables("Table1List").Rows(0).Item(0)
        Dim UserName As String = ds.Tables("Table1List").Rows(0).Item(1)
        Dim Nickname As String = ds.Tables("Table1List").Rows(0).Item(2)
        Dim Password As String = ds.Tables("Table1List").Rows(0).Item(3)
        Dim City As String = ds.Tables("Table1List").Rows(0).Item(4)
        Dim Address As String = ds.Tables("Table1List").Rows(0).Item(5)
        Dim Town As String = ds.Tables("Table1List").Rows(0).Item(6)
        Dim PostCode As String = ds.Tables("Table1List").Rows(0).Item(7)

        If Not Name Is Nothing Then
            Me.txtName.Text = Name
        End If
        If Not UserName Is Nothing Then
            Me.txtUsername.Text = UserName
        End If
        If Not Nickname Is Nothing Then
            Me.txtNickname.Text = Nickname
        End If
        If Not Password Is Nothing Then
            Me.txtPassword.Text = Password
        End If
        If Not City Is Nothing Then
            Me.txtCity.Text = City
        End If
        If Not Address Is Nothing Then
            Me.txtAddress.Text = Address
        End If
        If Not Town Is Nothing Then
            Me.txtTown.Text = Town
        End If
        If Not PostCode Is Nothing Then
            Me.txtPostcode.Text = PostCode
        End If

        Me.DataBind()
    End Sub

    Public Sub navigaterecords(ByVal position As Integer)
        Me.BindData()

        If Not Name Is Nothing Then
            Me.txtName.Text = Name
        End If
        If Not UserName Is Nothing Then
            Me.txtUsername.Text = UserName
        End If
        If Not Nickname Is Nothing Then
            Me.txtNickname.Text = Nickname
        End If
        If Not Password Is Nothing Then
            Me.txtPassword.Text = Password
        End If
        If Not City Is Nothing Then
            Me.txtCity.Text = City
        End If
        If Not Address Is Nothing Then
            Me.txtAddress.Text = Address
        End If
        If Not Town Is Nothing Then
            Me.txtTown.Text = Town
        End If
        If Not PostCode Is Nothing Then
            Me.txtPostcode.Text = PostCode
        End If
    End Sub

    Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
        If inc <> maxrows - 1 Then
            inc = inc + 1
            navigaterecords(inc)
        Else
            MessageBox.Show("No more applications!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
        End If
    End Sub

    Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
        If inc <> 0 Then
            inc = inc - 1
            navigaterecords(inc)
        Else
            MessageBox.Show("No more applications!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
        End If
    End Sub

    Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
        con.ConnectionString = "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source = H:\Testing\Project\user.mdb"
        con.Open()
        sql = "SELECT * FROM Table1"
        da = New OleDb.OleDbDataAdapter(sql, con)
        da.Fill(ds, "Table1List")
        con.Close()
        maxrows = ds.Tables("Table1List").Rows.Count

        Dim cb As New OleDb.OleDbCommandBuilder(da)
        Dim intresult As Integer

        intresult = MessageBox.Show("Confirm Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
        If intresult = Windows.Forms.DialogResult.Yes Then
            ds.Tables("Table1List").Rows(inc).Delete()
            da.Update(ds, "Table1List")
            maxrows = maxrows - 1
            inc = 0
            navigaterecords(inc)

        End If

        Me.BindData()
    End Sub


~Camo
User is offlineProfile CardPM
+Quote Post

wongth7

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 07:54 AM
Post #8

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

QUOTE(CamoDeveloper @ 2 Jul, 2009 - 05:40 AM) *

Here is a full example of what I was trying to explain earlier, I don't know if it works since I can't test the code so it might need some tweaking.

Private Sub frmUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.BindData()
End Sub
________________________________________________________________________________
_____
Public Sub BindData()
con.ConnectionString = "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source = H:\Testing\Project\user.mdb"
con.Open()
Sql = "SELECT * FROM Table1"
da = New OleDb.OleDbDataAdapter(Sql, con)
da.Fill(ds, "Table1List")
con.Close()
maxrows = ds.Tables("Table1List").Rows.Count

Dim Name As String = ds.Tables("Table1List").Rows(0).Item(0)
Dim UserName As String = ds.Tables("Table1List").Rows(0).Item(1)
Dim Nickname As String = ds.Tables("Table1List").Rows(0).Item(2)
Dim Password As String = ds.Tables("Table1List").Rows(0).Item(3)
Dim City As String = ds.Tables("Table1List").Rows(0).Item(4)
Dim Address As String = ds.Tables("Table1List").Rows(0).Item(5)
Dim Town As String = ds.Tables("Table1List").Rows(0).Item(6)
Dim PostCode As String = ds.Tables("Table1List").Rows(0).Item(7)

If Not Name Is Nothing Then
Me.txtName.Text = Name
End If
If Not UserName Is Nothing Then
Me.txtUsername.Text = UserName
End If
If Not Nickname Is Nothing Then
Me.txtNickname.Text = Nickname
End If
If Not Password Is Nothing Then
Me.txtPassword.Text = Password
End If
If Not City Is Nothing Then
Me.txtCity.Text = City
End If
If Not Address Is Nothing Then
Me.txtAddress.Text = Address
End If
If Not Town Is Nothing Then
Me.txtTown.Text = Town
End If
If Not PostCode Is Nothing Then
Me.txtPostcode.Text = PostCode
End If

Me.BindData()
End Sub
________________________________________________________________________________
______________
Public Sub navigaterecords(ByVal position As Integer)
Me.BindData()

If Not Name Is Nothing Then
Me.txtName.Text = Name
End If
If Not UserName Is Nothing Then
Me.txtUsername.Text = UserName
End If
If Not Nickname Is Nothing Then
Me.txtNickname.Text = Nickname
End If
If Not Password Is Nothing Then
Me.txtPassword.Text = Password
End If
If Not City Is Nothing Then
Me.txtCity.Text = City
End If
If Not Address Is Nothing Then
Me.txtAddress.Text = Address
End If
If Not Town Is Nothing Then
Me.txtTown.Text = Town
End If
If Not PostCode Is Nothing Then
Me.txtPostcode.Text = PostCode
End If
End Sub
________________________________________________________________________________
____________
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
If inc <> maxrows - 1 Then
inc = inc + 1
navigaterecords(inc)
Else
MessageBox.Show("No more applications!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
End Sub
________________________________________________________________________________
____________

Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
If inc <> 0 Then
inc = inc - 1
navigaterecords(inc)
Else
MessageBox.Show("No more applications!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
End Sub
________________________________________________________________________________
____________

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
con.ConnectionString = "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source = H:\Testing\Project\user.mdb"
con.Open()
sql = "SELECT * FROM Table1"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "Table1List")
con.Close()
maxrows = ds.Tables("Table1List").Rows.Count

Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim intresult As Integer

intresult = MessageBox.Show("Confirm Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If intresult = Windows.Forms.DialogResult.Yes Then
ds.Tables("Table1List").Rows(inc).Delete()
da.Update(ds, "Table1List")
maxrows = maxrows - 1
inc = 0
navigaterecords(inc)

End If

Me.BindData()
End Sub


~Camo



hi bro..thanks for your patience...i tried to type in your code in my program..but those words i mark down with blue color were underlined with blue lines in the program and the errors message there stated that all of those words were not declare..what should i do with it??

i tried to declare it like this...

CODE
Public Sub navigaterecords(ByVal position As Integer)

        Dim Name As String = ds.Tables("Table1List").Rows(0).Item(0)
        Dim UserName As String = ds.Tables("Table1List").Rows(0).Item(1)
        Dim Nickname As String = ds.Tables("Table1List").Rows(0).Item(2)
        Dim Password As String = ds.Tables("Table1List").Rows(0).Item(3)
        Dim City As String = ds.Tables("Table1List").Rows(0).Item(4)
        Dim Address As String = ds.Tables("Table1List").Rows(0).Item(5)
        Dim Town As String = ds.Tables("Table1List").Rows(0).Item(6)
        Dim PostCode As String = ds.Tables("Table1List").Rows(0).Item(7)

        Me.BindData()

        If Not Name Is Nothing Then
            Me.txtName.Text = Name
        End If
        If Not UserName Is Nothing Then
            Me.txtUsername.Text = UserName
        End If
        If Not Nickname Is Nothing Then
            Me.txtNickname.Text = Nickname
        End If
        If Not Password Is Nothing Then
            Me.txtPassword.Text = Password
        End If
        If Not City Is Nothing Then
            Me.txtCity.Text = City
        End If
        If Not Address Is Nothing Then
            Me.txtAddress.Text = Address
        End If
        If Not Town Is Nothing Then
            Me.txtTown.Text = Town
        End If
        If Not PostCode Is Nothing Then
            Me.txtPostcode.Text = PostCode
        End If
    End Sub


but the error message "Argument not specified for parameter 'index' of 'Public ReadOnly Default Property Chars(index As Integer) As Char'. appeared...sad.gif

______________________________
update:
i tried to remove the codes in "Public Sub navigaterecords(ByVal position As Integer)" and tried to log into my form...but it failed to login...the loading seems like extremely slow and cant log into my form at all sad.gif ...you sure those codes are ok?

This post has been edited by wongth7: 2 Jul, 2009 - 08:33 AM
User is offlineProfile CardPM
+Quote Post

wongth7

RE: Problems With Vb2005..with Microsoft Access

2 Jul, 2009 - 11:59 PM
Post #9

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

can someone help please..
User is offlineProfile CardPM
+Quote Post

LoveIsNull

RE: Problems With Vb2005..with Microsoft Access

3 Jul, 2009 - 02:23 AM
Post #10

Disbanding my Ignorance
****

Joined: 10 Mar, 2009
Posts: 536



Thanked: 45 times
My Contributions
Spoiler:
If only we could...


I really think that you might want to go back and read a little bit about the basics of the language.
Maybe these might help you:
http://en.wikibooks.org/wiki/Visual_Basic_.NET
http://www.homeandlearn.co.uk/NET/vbNET.html

You can also Google VB.Net Basics.

I am a strong advocate of structured learning, there is no way to know what is happening in the code or even how to modify other peoples code to your needs if you don't get some kind of structured learning.



Spoiler:
Now to get the Windex...

User is offlineProfile CardPM
+Quote Post

wongth7

RE: Problems With Vb2005..with Microsoft Access

3 Jul, 2009 - 09:05 AM
Post #11

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

QUOTE(LoveIsNull @ 3 Jul, 2009 - 02:23 AM) *

Spoiler:
If only we could...


I really think that you might want to go back and read a little bit about the basics of the language.
Maybe these might help you:
http://en.wikibooks.org/wiki/Visual_Basic_.NET
http://www.homeandlearn.co.uk/NET/vbNET.html

You can also Google VB.Net Basics.

I am a strong advocate of structured learning, there is no way to know what is happening in the code or even how to modify other peoples code to your needs if you don't get some kind of structured learning.



Spoiler:
Now to get the Windex...



if there's google for everything..then what's the use of this forum??.......i already look through search engine for what i want but i still cant get it..that's why im here posting this question..

if you cant help just don't bother to post....you dont know how to modify the code or whatever then why bother to reply here?..why not just post your sentence in everyone's question and ask them to google for answer..and ask the admin to close this forum down.... mad.gif

peace!




User is offlineProfile CardPM
+Quote Post

LoveIsNull

RE: Problems With Vb2005..with Microsoft Access

3 Jul, 2009 - 05:28 PM
Post #12

Disbanding my Ignorance
****

Joined: 10 Mar, 2009
Posts: 536



Thanked: 45 times
My Contributions
QUOTE(wongth7 @ 3 Jul, 2009 - 11:05 AM) *

if there's google for everything..then what's the use of this forum??.......i already look through search engine for what i want but i still cant get it..that's why im here posting this question..

if you cant help just don't bother to post....you dont know how to modify the code or whatever then why bother to reply here?..why not just post your sentence in everyone's question and ask them to google for answer..and ask the admin to close this forum down.... mad.gif

peace!


Just in case you come back to read this or other aspiring programmers, there is a lot going through my head so let me see if I can make something of this.
Part of me would apologize, but I posted with legitimate resources that could potentially help you. Others even posted code examples as you requested:
QUOTE(wongth7 @ 2 Jul, 2009 - 06:03 AM) *

please show me sample codes or something as i will find it hard to understand if you just explain those logic things etc for me


The trouble is just that we could give you all the code examples in the world, and you still wouldn't understand because you must have some remote idea of what the logic behind it is. We are here to help, but we're not (I am not) here to just modify code to suite your needs. I believe that would be bordering on impossible, because I (as of yet) am not a mind reader.
User is offlineProfile CardPM
+Quote Post

wongth7

RE: Problems With Vb2005..with Microsoft Access

3 Jul, 2009 - 07:32 PM
Post #13

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

QUOTE(LoveIsNull @ 3 Jul, 2009 - 05:28 PM) *

QUOTE(wongth7 @ 3 Jul, 2009 - 11:05 AM) *

if there's google for everything..then what's the use of this forum??.......i already look through search engine for what i want but i still cant get it..that's why im here posting this question..

if you cant help just don't bother to post....you dont know how to modify the code or whatever then why bother to reply here?..why not just post your sentence in everyone's question and ask them to google for answer..and ask the admin to close this forum down.... mad.gif

peace!


Just in case you come back to read this or other aspiring programmers, there is a lot going through my head so let me see if I can make something of this.
Part of me would apologize, but I posted with legitimate resources that could potentially help you. Others even posted code examples as you requested:
QUOTE(wongth7 @ 2 Jul, 2009 - 06:03 AM) *

please show me sample codes or something as i will find it hard to understand if you just explain those logic things etc for me


The trouble is just that we could give you all the code examples in the world, and you still wouldn't understand because you must have some remote idea of what the logic behind it is. We are here to help, but we're not (I am not) here to just modify code to suite your needs. I believe that would be bordering on impossible, because I (as of yet) am not a mind reader.


I already stated my problems there didn't I?..or did i not explain my problems clear enough??..why people like camo and Luc001 have no problem understanding what im saying??
all i need is just ANY ways to solve my problems, im not asking you to guess my problem or whatever...

instead of spamming here...why not you just explain what i should do or give me suggestion on how to solve my problem..but i seriously doubt you would bother to do so..
User is offlineProfile CardPM
+Quote Post

LoveIsNull

RE: Problems With Vb2005..with Microsoft Access

3 Jul, 2009 - 08:59 PM
Post #14

Disbanding my Ignorance
****

Joined: 10 Mar, 2009
Posts: 536



Thanked: 45 times
My Contributions
QUOTE(wongth7 @ 3 Jul, 2009 - 09:32 PM) *

all i need is just ANY ways to solve my problems, im not asking you to guess my problem or whatever...
instead of spamming here...why not you just explain what i should do or give me suggestion on how to solve my problem..but i seriously doubt you would bother to do so..


Right. Uh-huh.
Well, you could probably get have gotten some help had you followed any of my suggestions so that you could find out how to declare a variable of a particular scope. Or by looking here for a start.

Or I could say "You need to put the variable declarations at the top of your class". And give you this code:
CODE
Public Class Form1
    Dim sName As String
    Dim UserName As String
    Dim Nickname As String
    Dim Password As String
    Dim City As String
    Dim Address As String
    Dim Town As String
    Dim PostCode As String
End Class


User is offlineProfile CardPM
+Quote Post

CamoDeveloper

RE: Problems With Vb2005..with Microsoft Access

3 Jul, 2009 - 10:15 PM
Post #15

D.I.C Head
Group Icon

Joined: 12 Jun, 2009
Posts: 204



Thanked: 12 times
Dream Kudos: 200
My Contributions
Yall don't have to get into a fight over this. I didn't say my code would work, it was merely an example to help get you off your feet.

Wongth, LoveIsNull didn't say anything wrong when he said to use Google. I use Google first and can usually get some general idea of what's going on and what needs to be done to fix it.

~Camo
User is offlineProfile CardPM
+Quote Post

wongth7

RE: Problems With Vb2005..with Microsoft Access

4 Jul, 2009 - 05:54 AM
Post #16

New D.I.C Head
*

Joined: 16 Jun, 2009
Posts: 18

sorry bout the fuss..just trying to get things done....and im not a pro in vb...as due date is getting near, frustration kicks in.. crazy.gif



i already tried to declare all those words as string in my Public Class Form1

but it gets even worst....i can't log into my form at all..it just freeze there...any other ways???..i thought just some simple code to refresh the form after the data is deleted would solve it...no??

or can someone teach me how to

1. refresh the form right after i delete my data
2. lock the << , >> buttons if there were no data in the database

This post has been edited by wongth7: 4 Jul, 2009 - 05:55 AM
User is offlineProfile CardPM
+Quote Post

fixo

RE: Problems With Vb2005..with Microsoft Access

4 Jul, 2009 - 09:29 AM
Post #17

D.I.C Head
**

Joined: 10 May, 2009
Posts: 78



Thanked: 5 times
My Contributions
QUOTE(wongth7 @ 4 Jul, 2009 - 05:54 AM) *



Check your private messages Inputbox

~'J'~
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 07:29PM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month