Go Back   Access World Forums > Apps and Windows > VB.NET

Thread Tools Rate Thread Display Modes
Old 10-07-2017, 03:21 PM   #1
Newly Registered User
Join Date: Oct 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Suvivalmaster is on a distinguished road
Forms Database issue

Hello, I'm doing really well with my program however I've hit a hitch, I'm trying to allow the user to input data into the database, but for some annoying reason it's giving me an exception.

This is the error I receive "adt.Fill(ds)";

System.Data.OleDb.OleDbException occurred
  Message=The INSERT INTO statement contains the following unknown field name: 'firstname'.  Make sure you have typed the name correctly, and try the operation again.
  Source=Microsoft JET Database Engine
<Cannot evaluate the exception stack trace>
It is on this line of code that it creates the exception;
adt = New OleDbDataAdapter("insert into tbl_info (firstname, secondname, itemname, itemprice, itemquantity, itemtotal) values ('" & txtFirstname.Text & "', '" & txtSecondname.Text & "', '" & txtItemname.Text & "', '" & txtItemprice.Text & "', '" & txtItemquantity.Text & "', '" & txtItemtotal.Text & "')", dbconn)
I would really appreciate if someone could help me, I'm slightly new to VB and am learning in college but would like to study via the internet to better my understanding, if you require any more information please comment and I'll try my best go give it to you, thank you.

Suvivalmaster is offline   Reply With Quote
Old 10-07-2017, 03:58 PM   #2
Super Moderator
Join Date: Feb 2013
Location: UK
Posts: 9,826
Thanks: 37
Thanked 3,184 Times in 3,088 Posts
CJ_London is a jewel in the rough CJ_London is a jewel in the rough CJ_London is a jewel in the rough CJ_London is a jewel in the rough
Re: Forms Database issue

what don't you understand about the error message? seems clear to me, you don't have a field called 'firstname' in tbl_info
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue regarding database design and corresponding operations in forms Thomasso Theory and practice of database design 1 01-22-2017 03:04 PM
Odd issue with Forms kevlray General 6 11-25-2015 01:11 PM
Coummunity Management Database issue (issue in a Form) dugaucher Forms 8 03-14-2015 05:55 AM
Forms and Records Issue Treisio Forms 3 05-23-2013 06:13 AM
Question Database and Forms Issue Curtiskurt General 1 06-21-2012 11:27 AM

All times are GMT -8. The time now is 09:08 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World