473,802 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Data Please

Hi All,

I have VB & SQL 2005 Express but i'm afraid i am a newbie, my background is
in MS Access so please if you can give me any advice, please take my
inexperience into consideration.

I have two tables, i won't detail all the fields but just those that are
relevant.

Table 1
Company Name
Profits
Tax Year

Table 2
Tax Year
Tax Rate

quite simply i need to join the tables on the Tax Year fields so that when i
make another calculated field i.e. TaxPaid (= TaxRate*Profits ) it picks up
the right TaxRate for the right TaxYear.

If i do this using a join, my table (& therefore my user form) is always
read-only, so i can't change the Profits or anything (which needs to be done!)

In MS Access i would change the Recordset Type to Dynaset (Inconsistent
Update) is there something similar i need to do in VB to get this to work or
can anyone suggest any other way around it.

Please remember i am very much a newbie, i have tried the help files but
don't know what i am looking for, i have read several books but i can't
figure this one out.

Thanks very much
Emma

May 31 '07 #1
2 1076

"Emma Hope" <Em******@discu ssions.microsof t.comwrote in message
news:E4******** *************** ***********@mic rosoft.com...
Hi All,

I have VB & SQL 2005 Express but i'm afraid i am a newbie, my background
is
in MS Access so please if you can give me any advice, please take my
inexperience into consideration.

I have two tables, i won't detail all the fields but just those that are
relevant.

Table 1
Company Name
Profits
Tax Year

Table 2
Tax Year
Tax Rate

quite simply i need to join the tables on the Tax Year fields so that when
i
make another calculated field i.e. TaxPaid (= TaxRate*Profits ) it picks up
the right TaxRate for the right TaxYear.

If i do this using a join, my table (& therefore my user form) is always
read-only, so i can't change the Profits or anything (which needs to be
done!)

In MS Access i would change the Recordset Type to Dynaset (Inconsistent
Update) is there something similar i need to do in VB to get this to work
or
can anyone suggest any other way around it.

Please remember i am very much a newbie, i have tried the help files but
don't know what i am looking for, i have read several books but i can't
figure this one out.
Google is your friend.

I hope the link with some insight and examples will get you into the
ballpark.

http://www.google.com/search?hl=en&q...=Google+Search

You should think ADO.NET dataadapter, dataset and recordset.

You should get yourself a good ADO.Net book.

May 31 '07 #2
Emma,

It is never readonly, you cannot set that, however remember you need forever
the primary key to do an update, a delete or a insert.

VB.Net has very few methods to make the update part and will certainly not
do that in these versions with joined tables, you have to make the SQL
transaction code yourself for that. Are you great in that part of
programming it will no problem for you, otherwise forget it a while and just
read two tables.

http://www.vb-tips.com/dbpages.aspx?...3-8a9529b2b38b

Cor

"Emma Hope" <Em******@discu ssions.microsof t.comschreef in bericht
news:E4******** *************** ***********@mic rosoft.com...
Hi All,

I have VB & SQL 2005 Express but i'm afraid i am a newbie, my background
is
in MS Access so please if you can give me any advice, please take my
inexperience into consideration.

I have two tables, i won't detail all the fields but just those that are
relevant.

Table 1
Company Name
Profits
Tax Year

Table 2
Tax Year
Tax Rate

quite simply i need to join the tables on the Tax Year fields so that when
i
make another calculated field i.e. TaxPaid (= TaxRate*Profits ) it picks up
the right TaxRate for the right TaxYear.

If i do this using a join, my table (& therefore my user form) is always
read-only, so i can't change the Profits or anything (which needs to be
done!)

In MS Access i would change the Recordset Type to Dynaset (Inconsistent
Update) is there something similar i need to do in VB to get this to work
or
can anyone suggest any other way around it.

Please remember i am very much a newbie, i have tried the help files but
don't know what i am looking for, i have read several books but i can't
figure this one out.

Thanks very much
Emma

Jun 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3273
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old scripts working on a new server with the most recent version of PHP. I've pretty much taken care of all the various errors that were popping up. Most only pointed out out non-fatal undefined or assumed variables. I've been able to cure most of...
2
3932
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give them a caption, storing the caption and filename in a text file. It's a bit buggy when removing the photos and captions from the file, and also in displaying them on the delete page. you can see it in action at www.4am.com.au/gallery/upload.php...
7
3618
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
5
3004
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig <<<<<<<<<<<<<<CODE>>>>>>>>>>>>>>>> <html>
13
4341
by: Joner | last post by:
Hello, I'm having trouble with a little programme of mine where I connect to an access database. It seems to connect fine, and disconnect fine, but then after it won't reconnect, I get the error "operation is not allowed when object is open" so I take out the line of code: BookDetails.Connection1.Open and it comes up with the error "operation is not allowed when object
8
2753
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only the sequence nos and it should be such that i can access it through the structure .plz help me .
1
6120
by: al2004 | last post by:
Write a program that reads information about youth soccer teams from a file, calculates the average score for each team and prints the averages in a neatly formatted table along with the team name. Please follow the specifications for assignment 3 as described below otherwise points will be taken off. Input from a file Please create an input file named input.txt using a text editor like notepad or the Visual C++ editor and put the following...
1
1874
imrosie
by: imrosie | last post by:
Please help with this one,,,,,I've been trying everything in my arsenal to fix this one. I'm stumped.... I"ve got a unbound combo box (customername) that has two events (on click); AfterUpdate and NotInList. The AfterUpdate uses a 'me.recordsetclone' in order to display other data in controls associated with customerid/customername from the Customer table. The NotInlist, does just that, adds a new customer name to the list along with...
1
3210
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the code for attachment, I am not able to send anything. I get blank email. Can you please help me on this? Here is the html form:
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10285
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9114
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.