Selasa, 26 April 2016

RE: [MS_AccessPros] Opening SQL stored procedure in datasheet view


I could, but I like keeping the users on the same form. It seems to make for a simpler UI. Either way, I'd still have to refresh the original form. Is there a compelling reason?


---In, <duanehookom@...> wrote :

To update the underlying table I would probably link to the underlying table and create a bound form. You could then double-click the record in P-T query in a form to open the form bound to the underlying table.

Duane Hookom, MVP
MS Access

Date: Mon, 25 Apr 2016 16:17:37 -0700
Subject: RE: [MS_AccessPros] Opening SQL stored procedure in datasheet view


That was easy. Thanks.

Now, the decision of which record sources to create as SP in SQL, and which as PT queries in Access. That's more of a business/personnel question than a technical one. I'm not the SQL dba. Either way, I can write most of the SQL code.

Another question is what to do if I need to update underlying data? I assume that would go something like:
  1. Create unbound text/combo fields on top of the bound fields. When clicking into the bound field, unhide and move focus to the unbound field.
  2. Write SQL, and VBA to execute the SQL to update the underlying table(s).
  3. Refresh the form


---In, <duanehookom@...> wrote :


You can create a pass-through query with an SQL property of:

EXEC usp_Proc1

You will need to set up the ODBC connection string. The returned data will be read-only but can be used as a record source for a form or report.

Duane Hookom, MVP
MS Access

Date: Mon, 25 Apr 2016 15:40:09 -0700
Subject: [MS_AccessPros] Opening SQL stored procedure in datasheet view

How do I open a SQL stored procedure (SP) - e.g., named "usp_Proc1" - in Access datasheet view? This seems like a basic question, but I haven't been able to find a simple answer on the internet. The SP is a SELECT query. If needed, assume I have a connection string stConn.

The follow up need is how then to use that (and other) SPs as the recordsource for forms and reports.




Posted by:
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Upgrade your account with the latest Yahoo Mail app
Get organized with the fast and easy-to-use Yahoo Mail app. Upgrade today!



Tidak ada komentar:

Posting Komentar