This is a general question regarding the use of view and stored
procedures. I'm fairly new to databases and SQL.
I've created a SQL database using an Access Data Project ("ADP") and
I'm satified with the table structure. I've moved on to building some
front ends for our users.
I'm running into situations where I want subreports to be built from
queries [views or stored procedures-I don't know which to use so I use
the term query] that are dependent on the values in other controls.
I've played with stored procedures and I've figured out how to send
criteria to a stored procedure and then dynamically change the record
source of a subreport.
However, I'm running into cases where I can't add records to the
results of a stored procedure. The table I'm running a stored procedure
on has five fields: (1) Primary Key for each record, (2) FundID that's
a primary key in another table, (3) CompanyID that's a primary key in
another table, (4) Attribute 1 of the (Fund/Company) and (5) Attribute
2 of the (Fund/Company).
The stored procedure filters the set of Fund/Companies based on a
FundID from a form. I can update this stored procedure. However, for
users, they would like to see the Fund Name from the table that has
unique FundIDs. As soon as I include that into the stored procedure, I
can no longer add records.
My questions are many:
1. Is there a primer online that discusses the theory behind my
question? Recordsets, updatability, working with recordsets in forms?
2. What are some best practices for developing subreports, combo boxes,
list boxes, etc. where the data is dependent on the values in a control
3. I'm struggling with the best ways to grab objects on a form. If I'm
on the main form I'm comfortable working with the
Me.__object__._ _sub-oject routine. However, if I'm in one subform where
I need another subform to change based on the record I'm in, I feel
that my code to get at the subform is very klunky..
forms.main form name.sub form name.form.recor d source
I don't even know how I figured out the "form" part before record
source. Again, are there some basic rules or guides about navigating
through forms in VBA?
4. Should I be developing front ends in some other environment?
I know it's a lot, but all the advice from the newsgroups seems to
presuppose some knowledge about how ADP, ADO, ODBC..blah blah and I
can't seem to find any documents about ADP and SQL. 3 2483
(Ry************ @gmail.com) writes: However, I'm running into cases where I can't add records to the results of a stored procedure. The table I'm running a stored procedure on has five fields: (1) Primary Key for each record, (2) FundID that's a primary key in another table, (3) CompanyID that's a primary key in another table, (4) Attribute 1 of the (Fund/Company) and (5) Attribute 2 of the (Fund/Company).
The stored procedure filters the set of Fund/Companies based on a FundID from a form. I can update this stored procedure. However, for users, they would like to see the Fund Name from the table that has unique FundIDs. As soon as I include that into the stored procedure, I can no longer add records.
This problem as well as most of the questions you are ask are related
to Access and ADO. Access I don't have any experience of, but I do
some ADO. ADO is not a very good client library, because it's trying
to be smart, without being capable.
This particular problem can be worked around by not using the
..Update method of the recordset object, but perform updates through
stored procedures. However, there are cases where ADO will not even
let you modify the fields of a record.
My questions are many: 1. Is there a primer online that discusses the theory behind my question? Recordsets, updatability, working with recordsets in forms?
David Sceppa has a good book on Microsoft Press, "Programmin g ADO",
but it's couple of years old by now (as is ADO).
2. What are some best practices for developing subreports, combo boxes, list boxes, etc. where the data is dependent on the values in a control 3. I'm struggling with the best ways to grab objects on a form. If I'm on the main form I'm comfortable working with the Me.__object__._ _sub-oject routine. However, if I'm in one subform where I need another subform to change based on the record I'm in,
These are Access questions that are better asked in
comp.databases. ms-access.
4. Should I be developing front ends in some other environment?
If you have the choice, I would recommend you to switch to Visual
Studio .Net. There is a whole lot you will have relearn if you
move to .Net, but the .Net lanaguage are nicer to work in, and instead
of ADO you get ADO .Net. Despite the similarity in name, ADO .Net
is completely different and much nicer to work with. ADO .Net
permits you to use methods equivalent to .Update. If the default
does not work, you can override.
As for learning ADO .Net, David Sceppa has a good book on that
as well. As for general
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp
Thanks Erland. I will check out those books. Recently, I've also
discovered the Function/View wrapper technique for requerying forms.
Thanks for you help. Down the road, if our company was to develop an
ADP project, would your firm be able to port it over to a .Net
environment?
(Ry************ @gmail.com) writes: Thanks Erland. I will check out those books. Recently, I've also discovered the Function/View wrapper technique for requerying forms. Thanks for you help. Down the road, if our company was to develop an ADP project, would your firm be able to port it over to a .Net environment?
You might get better answers to such question in an Access newsgroup
or a .Net newsgroup. Having worked not at all with Access, and just a
little with .Net, I am not the right person to answer.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike N. |
last post by:
Hello:
I am new to T-SQL programing, and relativly new to SQL statements in
general, although I have a good understanding of database theory. I'm a
little confused as to the fundamental differences between a view and a
query, or rather, when it is more appropriate to use one vs. the other.
It seems to me that most select queries can be implemented as views, and I
can't see the downside to doing so.
|
by: Brad H McCollum |
last post by:
I've looked through many suggestions and partial examples all over
this newsgroup and still am not coming up with anything that does
specifically what I'm wanting to accomplish.
I'm writing a VB 6.0 application which uses SQL Server as the
back-end.
Here's an example of what I'm wanting to do...
A user accessing the VB GUI attempts to open a certain form. Code
|
by: Mike |
last post by:
Hello,
I have a few rather urgent questions that I hope someone can help with (I
need to figure this out prior to a meeting tomorrow.) First, a bit of
background: The company I work for is developing a web-based application,
one part of which involves allowing the user the ability to page through
transaction "history" information.
The _summary_ history table will have the following fields: ServiceName,
Date, User-Ref1, User-Ref2,...
|
by: Dave Stone |
last post by:
I've just installed SP3A on MSDE 2000 since when any projects I open
have a database window which (under 'Objects') lists Database
Diagrams, but not Views or Stored Procedures. Has anyone else seen
this and, more to the point, found a cure?
Dave
|
by: billmiami2 |
last post by:
Perhaps many of you MS Access fanatics already know this, but it seems
that stored procedures and views are possible in Jet. I thought I
would leave this message just in case it would help anyone.
I discovered this the other day while doing some experiments with ADO
and ADO.NET. Basically, I wanted to run a stored MS Access query with
parameters using the syntax
Execute MyProcedure @Param1, @Param2...
| |
by: mooreit |
last post by:
The purpose for my questions is accessing these technologies from
applications. I develop both applications and databases. Working with
Microsoft C#.NET and Microsoft SQL Server 2000 Production and 2005 Test
Environments.
What is the purpose of a view if I can just copy the vode from a view
and put it into a stored procedure?
Should I be accessing views from stored procedures?
|
by: gateshosting |
last post by:
Good day,
I am programming my Stored Procedures and Views for performance, since we are dealing with millions of records. I know this question is going to sound like I do NOT want to do it this way, but in this case, it may work...
I have an Invoice LineItems table which will only ever contain up to 3 items. It will NEVER contain any more than that. We only deal with 3 items/services, and it will never change. So let's call them A, B,...
|
by: binky |
last post by:
Hi folks, I'm just learning how to use MS Access as a front end for SQL Server, and have a question:
I have a stored procedure that returns a set of records from a SQL Server and loads it into a form in my Access application. This works as intended, but I'm having trouble trying to figure out how to modify records on the form... whenever I try i get the error that says youc an't modify this data because its based on an expression.
i'm...
|
by: Bogdan |
last post by:
Hi,
I have a stored procedure that uses JOINs to return columns from multiple
tables. I also have another stored proc that that takes a series of params
and updates multiple tables. I used the framework to auto-generate a table
adapter specifying both stored procs as Get/Fill and Update. The problem is
that columns from the JOINed table seem to marked as 'read-only' so trying
to update a row results in an exception. BTW, by default a...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |