.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 23rd, 2005, 08:36 AM
Harlequeen Harlequeen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 12 Harlequeen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 36 m
Reputation Power: 0
Updating but not ending!

I have a form which is a map, when I click on it a new label is drawn in the place I want and a second form opens and allows me to input data which refers to the new label place.

I am able to input the information to the database, then nothing happens. The insert code is shown below, minus any try statements I had, because they do not get that far. If I close the form, the insert takes place, but the label does not attach to the first form. If I don't close the form with the close button I have to stop debug running.

I am trying to teach this to myself, but am getting nowhere fast...

Any help would be appreciated.


Code:
Public Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        'MessageBox.Show("formnew " & f1.TextBox1.Text & " & " & f1.TextBox2.Text)

        OleDbDataAdapter1.Fill(DataSet11)
        pbman = Me.BindingContext(DataSet11, "Places")
        'rec_number = OleDbDataAdapter1.Fill(DataSet11)
        Dim ds As DataSet1



        OleDbConnection1.Open()

        OleDbCommand1.CommandText = "INSERT INTO Places(Name, Address1, Address2, Address3,Phone,leftx,topy,w,h) VALUES(?,?,?,?,?,?,?,50,28);"

        OleDbCommand1.Parameters.Add("@Name", TextBox1.Text)
        OleDbCommand1.Parameters.Add("@Address1", TextBox2.Text)
        OleDbCommand1.Parameters.Add("@Address2", TextBox3.Text)
        OleDbCommand1.Parameters.Add("@Address3", TextBox7.Text)
        OleDbCommand1.Parameters.Add("@Phone", TextBox4.Text)
        OleDbCommand1.Parameters.Add("@leftx", TextBox5.Text)
        OleDbCommand1.Parameters.Add("@topy", TextBox6.Text)
        OleDbCommand1.Parameters.Add("@w", TextBox8.Text)
        OleDbCommand1.Parameters.Add("@l", TextBox9.Text)


        Dim DBreturn As Integer


        DBreturn = OleDbCommand1.ExecuteNonQuery

        OleDbConnection1.Close()

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Updating but not ending!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT