Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2003, 07:14 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access alias question


I am doing a simple join query in Access. I want the resulting
recordset to have an alias name that I can refer to. Can anyone
please help me with the Access SQL syntax because I can't find
it in any books.

My query is:
  select employee.id, employee.name, employee.address,
  paygrades.grade, paygrades.insurancenumber from employees
  join paygrades on employee.id = paygrade.id
  where employee.department = 'IT'

How can I set the resulting record set to be called 'myRecords'

Can I then use a VB.Net datagrid to bind to the result set eg.

  myGrid.SetDataBindings(myDataset,"myrecords")

If I do the above query I can only bind to a single table -
ie I either bind to the employees or to the paygrades. I need
to get all fields into my bound data.

Any ideas?
 
Old December 12th, 2003, 11:56 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What are you trying to do.
Binding a query to two tables? please explain further



Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Circular reference caused by alias "May" jackpeters55 Access VBA 0 December 22nd, 2004 12:42 PM
date formate in alias mateenmohd SQL Server 2000 1 November 7th, 2004 02:58 AM
Access alias question badgolfer Access 2 December 15th, 2003 04:47 AM
The Alias Problem byterbit SQL Language 3 July 3rd, 2003 07:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.