pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: problem after upgrade ---
2+ messages / 2 participants
[nested] [flat]
* Re: problem after upgrade ---
@ 2003-04-01 17:44 Jeff Silberberg <jsilberberg@mindspring.com>
2003-04-01 18:37 ` Re: problem after upgrade --- Michael Calabrese <m2calabr@ournetoffice.com>
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Silberberg @ 2003-04-01 17:44 UTC (permalink / raw)
To: pgsql-odbc
Afternoon all,
We have been using the PostgreSQL with 6.4 and the WIN ODBC
drivers for a number of years. The ODBC is a link to reporting writting
and mostly enables MS Access & Crystal Reports users access to an
applications database. My problem is that we have literally Hundreds of
queries and reports written and none of them now work. The reason is that
when we did the upgrade to PostgreSQL 7.3 recently and now when we link to
the DB/Tables they all come back as public_nnnnnnnnn and therefore, none
of the existing references work.
I am sure someone else must have worked through this by now,
although I have only seen limited references to this issue in my searches
which is the reason for my post. I really do not want to rebuild all of
these tools !!
TIA,
JMS...
Jeffrey Silberberg
CompuDesigns, Inc.
Atlanta, GA. 30350
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: problem after upgrade ---
2003-04-01 17:44 Re: problem after upgrade --- Jeff Silberberg <jsilberberg@mindspring.com>
@ 2003-04-01 18:37 ` Michael Calabrese <m2calabr@ournetoffice.com>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Calabrese @ 2003-04-01 18:37 UTC (permalink / raw)
To: pgsql-odbc
> that when we did the upgrade to PostgreSQL 7.3 recently and now when we
> link to the DB/Tables they all come back as public_nnnnnnnnn and
> therefore, none of the existing references work.
>
Here is the Access VBA Code that I use to relink tables from 7.3.x. Please
note in the code that I filter out some tables.
I hope that this h
'*********************************************************************************
Private Sub RelinkTables()
'*********************************************************************************
'-----------------------------------------------
'Make sure all tables and forms are closed!!!!!!
'-----------------------------------------------
'DB_DNS As String = "ODBC;DSN=BFData;"
Static wsp As Workspace
Static con As Connection
Static init As Integer
Dim stable As String
Dim rst As Recordset
Dim sSQL As String
If init = 0 Then 'Detect if this is the first time we have run this
function
init = 1 'Mark we have been through here
'Initialize the ODBC Connection
Set wsp = CreateWorkspace("ODBC Workspace", "", "", dbUseODBC)
Set con = wsp.OpenConnection(DB_DNS, , , DB_DNS)
End If
sSQL = "SELECT tablename as Name " & _
"FROM pg_tables " & _
"WHERE schemaname = 'public' " & _
"ORDER BY 1; "
Set rst = con.OpenRecordset(sSQL, dbOpenSnapshot)
'con.Execute sSQL, dbRunAsync
'While con.StillExecuting
' DoEvents
'Wend
On Error Resume Next
Do While Not rst.EOF
stable = rst![Name]
rst.MoveNext
If (stable <> "mkt_contactdata") And (stable <> "msysconf") And
(stable <> "partcost_changes") And (Left(stable, 2) <> "zz") Then
On Error Resume Next
DoCmd.DeleteObject acTable, stable
On Error GoTo 0
DoCmd.TransferDatabase acLink, "ODBC Database", DB_DNS, acTable,
stable, stable
End If
Loop
sSQL = "SELECT viewname as Name " & _
"FROM pg_views " & _
"WHERE schemaname = 'public' " & _
"ORDER BY 1; "
Set rst = con.OpenRecordset(sSQL, dbOpenSnapshot)
'con.Execute sSQL, dbRunAsync
'While con.StillExecuting
' DoEvents
'Wend
On Error Resume Next
Do While Not rst.EOF
stable = rst![Name]
rst.MoveNext
If (stable <> "mkt_contactdata") And (stable <> "msysconf") And
(stable <> "partcost_changes") And (Left(stable, 2) <> "zz") Then
On Error Resume Next
DoCmd.DeleteObject acTable, stable
On Error GoTo 0
DoCmd.TransferDatabase acLink, "ODBC Database", DB_DNS, acTable,
stable, stable
End If
Loop
End Sub
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-04-01 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-01 17:44 Re: problem after upgrade --- Jeff Silberberg <jsilberberg@mindspring.com>
2003-04-01 18:37 ` Michael Calabrese <m2calabr@ournetoffice.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox