Showing posts with label back. Show all posts
Showing posts with label back. Show all posts

Monday, March 19, 2012

Microsoft Access 2000 missing ODBC Links

I have a Microsoft Access 2000 with several ODBC linked tables.
The back end DB is SQL Server 2000.
At the beginning everything was running OK.
Apparently randomly, Access returns the following error:
"ODBC -- connection to SQL Server failed" when I try to open a linked table that previously work.
I must delete the linked table and create the link again to let the system work again.
Please Help !
Thanks
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
That happens whenever you make a schema change to the table in SQL
Server. One way to avoid these errors is to write VBA code that runs
on startup. It deletes any old links and re-creates them when the
Access app opens, guaranteeing that the links are always valid.
--Mary
On Fri, 22 Oct 2004 02:40:27 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>I have a Microsoft Access 2000 with several ODBC linked tables.
>The back end DB is SQL Server 2000.
>At the beginning everything was running OK.
>Apparently randomly, Access returns the following error:
>"ODBC -- connection to SQL Server failed" when I try to open a linked table that previously work.
>I must delete the linked table and create the link again to let the system work again.
>Please Help !
>Thanks
>
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Thanks for the help, but the base SQL Server tables are always the same !
No schema update have been made to them.
PS: Sorry for my POOR english...
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||It might be a network error if you're not making any schema changes.
I'd still recommend creating a procedure to deletelink/relink tables.
This will save you from having to do it manually every time there's an
error and the connection gets dropped.
--Mary
On Fri, 22 Oct 2004 08:33:12 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for the help, but the base SQL Server tables are always the same !
>No schema update have been made to them.
>PS: Sorry for my POOR english...
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Thanks for answering me !
I'll keep on trying.
Table relinking solution is OK but it's too slow...
Thanks anyway.
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||It shouldn't be slow at all if you have a valid SQL Server connection
over a LAN. It should only take a couple of seconds for the code to
execute.
--Mary
On Mon, 25 Oct 2004 01:38:45 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for answering me !
>I'll keep on trying.
>Table relinking solution is OK but it's too slow...
>Thanks anyway.
>
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Relinking one or two tables is OK, but I have 110 tables linked :-O !
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||I'm not talking about doing it manually, I'm talking about running VBA
code that uses DAO to delete and recreate tabledef objects. This
should run very quickly since all it's doing is creating tabledef
objects in the local .mdb and setting their connection properties. You
don't access the actual tables on the server until you open them. The
only way this code takes longer than a few seconds is if you're
linking thousands of tables, which no one in their right mind is going
to do anyway.
--Mary
On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Relinking one or two tables is OK, but I have 110 tables linked :-O !
>
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||You shouldn't need to delete and recreate the TableDef objects Umberto. Just
call the RefreshLink method. Mary is correct it should go very fast -
seconds not minutes. Use this code:
For Each tdf In CurrentDb.TableDefs
If InStr(1, tdf.Connect, "ODBC") > 0 Then
tdf.RefreshLink
End If
Next
"Mary Chipman" <mchip@.online.microsoft.com> wrote in message
news:ivlsn0p3bhju561t3i46vu8g01j2a73d37@.4ax.com... [vbcol=seagreen]
> I'm not talking about doing it manually, I'm talking about running VBA
> code that uses DAO to delete and recreate tabledef objects. This
> should run very quickly since all it's doing is creating tabledef
> objects in the local .mdb and setting their connection properties. You
> don't access the actual tables on the server until you open them. The
> only way this code takes longer than a few seconds is if you're
> linking thousands of tables, which no one in their right mind is going
> to do anyway.
> --Mary
> On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
> wrote:
ASP.NET resources...
>
|||I have been having the same trouble lately, but I think I just fixed it.
When linking the table there is a check box to save password (I swear I
have never seen it before). I reestablished one table from each
database I am linked to and it seems to work. Previously every time I
closed and reopened Access I had to relink the tables.
Ed21
Posted via http://www.webservertalk.com
View this thread: http://www.webservertalk.com/message443464.html

Microsoft Access 2000 missing ODBC Links

I have a Microsoft Access 2000 with several ODBC linked tables.
The back end DB is SQL Server 2000.
At the beginning everything was running OK.
Apparently randomly, Access returns the following error:
"ODBC -- connection to SQL Server failed" when I try to open a linked table
that previously work.
I must delete the linked table and create the link again to let the system w
ork again.
Please Help !
Thanks
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...That happens whenever you make a schema change to the table in SQL
Server. One way to avoid these errors is to write VBA code that runs
on startup. It deletes any old links and re-creates them when the
Access app opens, guaranteeing that the links are always valid.
--Mary
On Fri, 22 Oct 2004 02:40:27 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>I have a Microsoft Access 2000 with several ODBC linked tables.
>The back end DB is SQL Server 2000.
>At the beginning everything was running OK.
>Apparently randomly, Access returns the following error:
>"ODBC -- connection to SQL Server failed" when I try to open a linked table
that previously work.
>I must delete the linked table and create the link again to let the system
work again.
>Please Help !
>Thanks
>
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||Thanks for the help, but the base SQL Server tables are always the same !
No schema update have been made to them.
PS: Sorry for my POOR english...
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||It might be a network error if you're not making any schema changes.
I'd still recommend creating a procedure to deletelink/relink tables.
This will save you from having to do it manually every time there's an
error and the connection gets dropped.
--Mary
On Fri, 22 Oct 2004 08:33:12 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for the help, but the base SQL Server tables are always the same !
>No schema update have been made to them.
>PS: Sorry for my POOR english...
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||Thanks for answering me !
I'll keep on trying.
Table relinking solution is OK but it's too slow...
Thanks anyway.
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||It shouldn't be slow at all if you have a valid SQL Server connection
over a LAN. It should only take a couple of seconds for the code to
execute.
--Mary
On Mon, 25 Oct 2004 01:38:45 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for answering me !
>I'll keep on trying.
>Table relinking solution is OK but it's too slow...
>Thanks anyway.
>
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||Relinking one or two tables is OK, but I have 110 tables linked :-O !
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||I'm not talking about doing it manually, I'm talking about running VBA
code that uses DAO to delete and recreate tabledef objects. This
should run very quickly since all it's doing is creating tabledef
objects in the local .mdb and setting their connection properties. You
don't access the actual tables on the server until you open them. The
only way this code takes longer than a few seconds is if you're
linking thousands of tables, which no one in their right mind is going
to do anyway.
--Mary
On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Relinking one or two tables is OK, but I have 110 tables linked :-O !
>
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||You shouldn't need to delete and recreate the TableDef objects Umberto. Just
call the RefreshLink method. Mary is correct it should go very fast -
seconds not minutes. Use this code:
For Each tdf In CurrentDb.TableDefs
If InStr(1, tdf.Connect, "ODBC") > 0 Then
tdf.RefreshLink
End If
Next
"Mary Chipman" <mchip@.online.microsoft.com> wrote in message
news:ivlsn0p3bhju561t3i46vu8g01j2a73d37@.
4ax.com...
> I'm not talking about doing it manually, I'm talking about running VBA
> code that uses DAO to delete and recreate tabledef objects. This
> should run very quickly since all it's doing is creating tabledef
> objects in the local .mdb and setting their connection properties. You
> don't access the actual tables on the server until you open them. The
> only way this code takes longer than a few seconds is if you're
> linking thousands of tables, which no one in their right mind is going
> to do anyway.
> --Mary
> On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
> wrote:
>
ASP.NET resources...[vbcol=seagreen]
>|||I have been having the same trouble lately, but I think I just fixed it. Whe
n linking the table there is a check box to save password (I swear I have ne
ver seen it before). I reestablished one table from each database I am linke
d to and it seems to work. Previously every time I closed and reopened Acces
s I had to relink the tables.

Wednesday, March 7, 2012

Metadata Inheritance

Hello,
I have written a mechanism which returns meta data back to a client for
different views. For example, one meta data item on a column is the Display
Name.
Now, so I don't have to keep attaching meta data to a particular column
every time I create a new view, I "inherit" the meta data from a parent view
or table by looking at all the same named columns in any views or tables
that the table depends (sysdepends) on.
The problem is, sometimes it make sense to change the name of a column in a
view from the underlying table (e.g. company table has a "name" column, but
in the view, you want to call it "company_name").
My question is, is there an easy way to determine where a view's column
really came from?
Thanks,
-PaulNever mind, I forgot to look at the depnumber column in sysdepends!
"Paul" <a@.b.com> wrote in message
news:eWN9knVCFHA.3940@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I have written a mechanism which returns meta data back to a client for
> different views. For example, one meta data item on a column is the
> Display Name.
> Now, so I don't have to keep attaching meta data to a particular column
> every time I create a new view, I "inherit" the meta data from a parent
> view or table by looking at all the same named columns in any views or
> tables that the table depends (sysdepends) on.
> The problem is, sometimes it make sense to change the name of a column in
> a view from the underlying table (e.g. company table has a "name" column,
> but in the view, you want to call it "company_name").
> My question is, is there an easy way to determine where a view's column
> really came from?
> Thanks,
> -Paul
>|||Okay, now the hard question.
How do I correlate a column in the sysdepends table back to a column in the
resulting view's columns?
Thanks,
-Paul
"Paul" <a@.b.com> wrote in message
news:OBXyfyVCFHA.1836@.tk2msftngp13.phx.gbl...
> Never mind, I forgot to look at the depnumber column in sysdepends!
>
> "Paul" <a@.b.com> wrote in message
> news:eWN9knVCFHA.3940@.TK2MSFTNGP09.phx.gbl...
>|||On Wed, 2 Feb 2005 15:27:44 -0500, Paul wrote:

>Okay, now the hard question.
>How do I correlate a column in the sysdepends table back to a column in the
>resulting view's columns?
Hi Paul,
You don't.
You are probably thinking right now of fairly straight-forward views,
where such a mapping would be viable. But views can be fairly complex!
CREATE VIEW test
AS SELECT Col1 - Col2 AS A,
Col1 + Col2 AS B,
CASE WHEN EXISTS (SELECT *
FROM YZ
WHERE Foo = SomeTable.Bar)
THEN 1
ELSE 2
END AS C,
'Constant value' AS D,
Col3 + 1 AS E,
Col3 - 1 AS F
FROM SomeTable
How should each of the view's columns be correlated to each of the
underlying table's columns? And remember that this is also a fairly simple
example - I could come up with much more contrived views (some of my real
views for projects I do are much more contrived!)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Saturday, February 25, 2012

Messages back from SqlServer while a Backup is being completed?

I have a WinForms application in which I am wrapping the backing up of a sql
database. In order to back up the database I am using the BACKUP DATABASE
t-sql and the STATS=5 in order to get the progress back from sql server.
Here is the exact script:
BACKUP DATABASE test_dvpt
TO test_Backup
WITH INIT,
STATS=5
Does anyone know how I can get the messages like "5 percent backed up" ...
"10 percent backed up" to my win forms application in order to update a
progress bar?You can handle the connection object InfoMessage event to get these progress
messages.
Hope this helps.
Dan Guzman
SQL Server MVP
"Jason Haley" <JasonHaley@.discussions.microsoft.com> wrote in message
news:3D7A28DB-F43E-4A3E-8909-14363404A177@.microsoft.com...
>I have a WinForms application in which I am wrapping the backing up of a
>sql
> database. In order to back up the database I am using the BACKUP DATABASE
> t-sql and the STATS=5 in order to get the progress back from sql server.
> Here is the exact script:
> BACKUP DATABASE test_dvpt
> TO test_Backup
> WITH INIT,
> STATS=5
> Does anyone know how I can get the messages like "5 percent backed up" ...
> "10 percent backed up" to my win forms application in order to update a
> progress bar?