473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

need help with my project work

Hi,
I'm new to visual basic. I have a problem. i connected the database to the form and i added the code below to prompt if there is any blank textbox. When nothing is entered into the textbox and when the first box is left blank, there should be a prompt that says please enter rented videos. However that does not appear and instead there is an error. "Me.Rented_VideosBindingSource.EndEdit()" is highlighted and a message box appears saying NoNullAllowedException. Please help me. Thanks alot in advance! Smile Smile

This is the program.

Expand|Select|Wrap|Line Numbers
  1. Public Class RentedVideos
  2.  
  3. Private Sub Rented_VideosBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rented_VideosBindingNavigatorSaveItem.Click
  4. Me.Validate()
  5. Me.Rented_VideosBindingSource.EndEdit()
  6. Me.TableAdapterManager.UpdateAll(Me.Digital_Video_DatabaseDataSet1)
  7.  
  8. If Rented_VideosTextBox.Text = "" Then
  9. MessageBox.Show("Please enter rented videos.")
  10. ElseIf (Videos_IDTextBox.Text = "") Then
  11. MessageBox.Show("Please enter videos ID.")
  12. ElseIf (PriceTextBox.Text = "") Then
  13. MessageBox.Show("Please enter Price.")
  14. ElseIf (Customers_NameTextBox.Text = "") Then
  15. MessageBox.Show("Please enter customers name.")
  16. ElseIf (Customers_ContactTextBox.Text = "") Then
  17. MessageBox.Show("Please enter Customers Contact.")
  18. Else
  19. Dim RentedVideos As New RentedVideos
  20. Rented_VideosTextBox.Text = ""
  21. Videos_IDTextBox.Text = ""
  22. Customers_NameTextBox.Text = ""
  23. MessageBox.Show("Customer Database successfully added.")
  24. End If
  25.  
  26. End Sub
  27.  
  28. Private Sub RentedVideos_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  29. 'TODO: This line of code loads data into the 'Digital_Video_DatabaseDataSet.Videos_Titles' table. You can move, or remove it, as needed.
  30. Me.Videos_TitlesTableAdapter.Fill(Me.Digital_Video_DatabaseDataSet.Videos_Titles)
  31. 'TODO: This line of code loads data into the 'Digital_Video_DatabaseDataSet1.Rented_Videos' table. You can move, or remove it, as needed.
  32.  
  33. Me.Rented_VideosTableAdapter.Fill(Me.Digital_Video_DatabaseDataSet1.Rented_Videos)
  34.  
  35. End Sub
  36.  
Jul 18 '08 #1
4 1098
First I got to get this in before you get yelled at by the moderators to use the [code] Tag on your code so we can help you better. Secondly we can't do stuff for you but your problem is within the scope so please phrase it better. There now you shouldn't get moderator'd. Now as per your problem give me some time and I'll edit this post or Plater or Alias will help you first.
Jul 18 '08 #2
hi,
i'm really quite new to this and i'm not sure how to edit the question which i have currently posted. I'm so sorry that i didn't add the code Tag. I am really new at this and I know this isn't an excuse but i'm sorry if i didn't ask the question right. I tried many ways to solve the problem but i'm still unable to find out what is causing it. It was also very difficult for me to explain the situation as I've just been using Visual Basic for a month.

Hi,
I'm new to visual basic. I have a problem. i connected the database to the form and i added the code below to prompt if there is any blank textbox. When nothing is entered into the textbox and when the first box is left blank, there should be a prompt that says please enter rented videos. However that does not appear and instead there is an error. "Me.Rented_VideosBindingSource.EndEdit()" is highlighted and a message box appears saying NoNullAllowedException. Please help me. Thanks alot in advance! Smile Smile
Jul 19 '08 #3
Curtis Rutland
3,256 Expert 2GB
Welcome to Bytes!

We appreciate it if you read the Posting Guidelines. This can also be found by clicking the help link near the search at the top of the page. Specifically, we like you to put [code] tags around your code so that it is formatted properly and is easier to read. And as you know, if it is easier to read and understand, it will be easier for the Experts to help you out. Basically, what you can do is paste your code in, highlight it, and click the # button on the text editor.

I edited both of your posts to correct this, and I removed the code from your second post, seeing as it was the same as in the first.

Once again, welcome to Bytes! Enjoy your stay here.

MODERATOR
Jul 19 '08 #4
Thanks for adding the tags
Jul 19 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Nikita A. Visnevski | last post by:
Hi everyone, I am rather new to Java beans. Just picked up a book last night and started reading about them. I am building an application that allows a user to define objects with dynamic...
11
by: Mark | last post by:
Hi, For the last 2 years I've been developing vehicle tracking/telemetric software for a company as a self employed individual. The project is quiet big, and is going to be there flagship...
3
by: Andrej Hristoliubov | last post by:
I am the best c++ programmer in the whole wide world. Trust ME! My reference is Victor Bazarov,Valentin Samko,Alf P.Steinbach( Me and Alf actually intern together at Microsoft), and Bjarne...
10
by: Tom | last post by:
I am looking for some ideas for how to design the layout of the form for data entry and to display the data for the following situation: There are many sales associates. A sales associate can work...
48
by: Chad Z. Hower aka Kudzu | last post by:
A few of you may recognize me from the recent posts I have made about Indy <http://www.indyproject.org/indy.html> Those of you coming to .net from the Delphi world know truly how unique and...
13
by: Brett Baisley | last post by:
At school, we do all of our coding in emacs, but I am trying to get the example apps working at home using Visual C++.net. In the example, there are 4 .cpp files (canvas.cpp, main.cpp,...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
2
by: alvinguy | last post by:
Hi Guys, I'm working on a SQL problem and am a bit stuck. I'll have to apologize for I'm still very new to this and can't do a lot of complex queries yet. I've attached what I've done so far,...
4
by: adam_kroger | last post by:
BRIEF EXPLANATION: I have 6 TextBoxes named LIS1, LIS2, LIS3, ... LIS6. I want to be able to reference them using a For/Next loop and either read ot write to them. In VBA I would use something...
4
by: Jason Ourscene | last post by:
Trying to start a project and need a little guidance. I am completely new to svn and have been programming php for a couple months now. Heres where i am at and what i want to do: 1. I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.