473,397 Members | 2,068 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,397 software developers and data experts.

Simple VB 2008 Question

Apologies, I have posted this question before, but am still looking for an answer, and have therefore rephrased the question.

Users enter data into the database using a windows form. I am happy I have this working and can create records in a SQL 2000 database fine

However there are some fields that have a default value that the user doesn't need to enter, but I want them to be included in the database record they are creating. One of these fileds is called hotel

I have a dataset called employeesdataset
within the dataset is a table called employees
within the table is a field called hotel. I also have a variable field called @hotelno
which = 41


I want to set the value of the hotel field (within the current record the form is creating) to @hotelno (41)

The other fields within the current record are bound to the form are are inputted by the user.

The hotel field is not a field on the form but is held within the record.

How to I make the field Hotel=@hotelno or 41 before saving the record?
Jul 28 '08 #1
1 926
Dököll
2,364 Expert 2GB
That's okay, Dellboymash!

And sorry for your troubles... Would you be able to post part of your code for looks?

I have been toying with VB Express 2005, can't be too far off 2008. Have you looked at example videos to see if there are ideas there?

Also, is @hotelno an AutoNumber, you seemed to be saying it is generated but not part of the form, in which case reading this back to your form should be flawless if you SELECT * from YourTable, you'd get hte AutoNumber added in the back-end for hotelno.

Please tell us more or post what you ahve thur far for a closer look.

In a bit!

Dököll
Jul 28 '08 #2

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

Similar topics

0
by: Jordan S. | last post by:
Okay so I've finally "seen the Light" about writing automated unit tests ahead of time. Question: What is a very simple approach that I can use to setting up automated unit tests, considering...
1
by: Victor | last post by:
Hi guys I have a small question abou the vs2005's text editor. in my text editor, any space or tabs become little dot. i forget what shortcut i pressed.It looks not right to me at all. Can anyone...
10
by: blaine | last post by:
Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is...
13
by: John Dann | last post by:
A Python newbie, but some basic understanding of how classes, objects etc work in eg VB.Net. However, I'm struggling a little to translate this knowledge into the Python context. I'm trying to...
3
by: z.ghulam | last post by:
Hi, I am trying to create a query from a table which has an ID, Diary and Date fields. A particular ID may have several diary entries which all have their specific date. What I'm after is a...
6
by: =?Utf-8?B?RWR3YXJk?= | last post by:
hi everybody, There is an error that drives me crazy and I can't figure out why VB.net behaves this way. I have a form and a textbox and the following code in the form Loads event Dim Ab As...
9
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
Hi all: after reading different places/sites about linq... I ran into these questions: 1. What framework do we need to run linq ? (does it depend on what version of visual studio we have?) how...
5
by: Oriane | last post by:
Hi, With Asp.net 2.0, when a internet user logs in with a "login authentication form", is the password encrypted when it is sent to the server ? Is is hashed ? Best regards
6
by: ebony.soft | last post by:
Dear all Hi I encountered a simple but IMO important problem about the C++ linkage model and One Definition Rule. Why the following code link? file1.cpp int x; file2.cpp
25
by: Brian | last post by:
I have a datetimepicker formated for just time, the user selects the time. I want to compare if that time is between midnight and 8 am dtmTime #11:59:59 PM# and dtmTime < #08:00:00 AM# this...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.