Showing posts with label appear. Show all posts
Showing posts with label appear. Show all posts

Monday, March 26, 2012

Refreshing Tables In Database

I have a stored procedure that creates a table. It works fine except until
I
refresh the database, the table doesn't appear ... and views and reports
can't find it.
Does anyone know how I can do this automatically with SQL or VBA (I'm using
an Access project as my front end)?
Thanks!
HIf I had to guess, I would say that you create the table as one user and the
n
try to access it as another - just a guess
"Howard Brody" wrote:

> I have a stored procedure that creates a table. It works fine except unti
l I
> refresh the database, the table doesn't appear ... and views and reports
> can't find it.
> Does anyone know how I can do this automatically with SQL or VBA (I'm usin
g
> an Access project as my front end)?
> Thanks!
> H|||Howard Brody wrote:
> I have a stored procedure that creates a table. It works fine except
> until I refresh the database, the table doesn't appear ... and views
> and reports can't find it.
> Does anyone know how I can do this automatically with SQL or VBA (I'm
> using an Access project as my front end)?
> Thanks!
> H
This seems to be an Access related issue. I would post the question to
an Access group and see what they say.
David Gugick
Imceda Software
www.imceda.com|||I dunno ... the table doesn't appear until the database is refreshed whether
I run the code from a stored procedure or the query analyzer - which has
nothing to do the Access front end.
I would think that SQL would have a command or function for refreshing your
database. I just haven't found it yet.
H
"David Gugick" wrote:

> This seems to be an Access related issue. I would post the question to
> an Access group and see what they say.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||Howard Brody wrote:
> I dunno ... the table doesn't appear until the database is refreshed
> whether I run the code from a stored procedure or the query analyzer
> - which has nothing to do the Access front end.
> I would think that SQL would have a command or function for
> refreshing your database. I just haven't found it yet.
> H
>
There's really no such thing as refreshing a database. Seeing the
objects in a list, for example, is a client issue (Access in this case
or could just as well be Query Analyzer). Once you create an object in
SQL Server, it's there, whether you see it in the user-interface of an
application or not. There's no real live-feed of database objects like
you have when viewing file, for instance, in Explorer - which keeps an
eye on folders for changes - most times. Even in QA, you don't need to
see the object in the Object Browser to run a query against it. Whereas,
I suspect, you need to see the object in Access to create a query or
open up the table in the Access UI. That was my reason for suggesting
you post to the Access group because possibly there is a feature of
Access that can mitigate this problem somewhat.
David Gugick
Imceda Software
www.imceda.com

Friday, March 9, 2012

Reference Empty Data Set

I have a dataset that sometimes is empty. I have it as a detail row in a table on the report, but since the dataset is null the row does not appear. What I would like to do is have it say "No results" if there are no results, otherwise have it show the results.

I tried to add a textbox and reference the textbox on the table, but it was a no go.

Here is what I had in my textbox

<code>
=code.noRows(ReportItems!table8!textbox30)
</code>

and this is what I was using in the code

<code>
Function noRows(byVal result) as string
if result = "" then
noRows = "NO Results"
else
noRows = result
end if
end function
</code>

Can anyone assist me with how to do this?

Thanks

Try this:

Data regions (matrix, table, list, chart) have a so-called NoRows property. If set, this is the message to display in a textbox (that replaces the data region when no rows of data are available).

Note: the NoRows property is available in the VS properties window.

-- Robert

|||When I use that my header disappears. Is there a way around this?
I need the "No Results" to appear on the detail line and the header to stay regardless.

Thanks

|||

No. If you use the NoRows message property, it will replace the entire table.

-- Robert

Refer to a field in a header

Ii,
I have a text box in the body of my report containing:
=Code.setMonth(ReportItems!textbox13.Value) but i want this to appear in
another textbox in my header. I have you read you can't refer directly to a
field. This is what I have in my Header textbox:
=ReportItems("textbox14").Value. Nothing shows up when i run the report. How
can I get this to appear?
Thanks in advance,
RhondaTo update this, it is actually a custom function I am calling, if I place th
e
call in the header textbox nothing appears.
"Rhonda" wrote:

> Ii,
> I have a text box in the body of my report containing:
> =Code.setMonth(ReportItems!textbox13.Value) but i want this to appear in
> another textbox in my header. I have you read you can't refer directly to
a
> field. This is what I have in my Header textbox:
> =ReportItems("textbox14").Value. Nothing shows up when i run the report. H
ow
> can I get this to appear?
> Thanks in advance,
> Rhonda