change the database 
Author Message
 change the database

I'd like to change the database during the runtime. Normally &DbPointer& is
adm_01.mdb. Now let's think about, I'd want to change in some cases the
database. I tried it with following code. But I'm still not able to logon.
Something is wrong in the syntax. But I don't know what. The database is
local on my client and not in the net. All helpfiles I can find only tell
about how to do in the net???!!!!

Holger

DbPointer = "c:\programme\adm\adm_02.mdb"

    Dim m_report As Report
    Dim DbPointer As String

    DoEvents ' Bildschirm-Aufbau !
    Screen.MousePointer = vbHourglass

    Set m_report =
CRW.Application.OpenReport("C:\SP\VBProgs\aida\Reports\ADM\deu\" &
GetBerichteFeld(FrmAuswertung.CboBericht.Text, "Report"))

    CRW.Database.LogOnServer (,,"provider=microsoft.jet.oledb.4.0; data
source='" & DbPointer & "';")
    CRW.Database.SetDataSource ("provider=microsoft.jet.oledb.4.0; data
source='" & DbPointer & "';")



Mon, 30 Dec 2002 03:00:00 GMT  
 change the database
The Problem is SOLVED!!! ;->
thanks,
Holger Butschek



Quote:
> I'd like to change the database during the runtime. Normally &DbPointer&
is
> adm_01.mdb. Now let's think about, I'd want to change in some cases the
> database. I tried it with following code. But I'm still not able to logon.
> Something is wrong in the syntax. But I don't know what. The database is
> local on my client and not in the net. All helpfiles I can find only tell
> about how to do in the net???!!!!

> Holger

> DbPointer = "c:\programme\adm\adm_02.mdb"

>     Dim m_report As Report
>     Dim DbPointer As String

>     DoEvents ' Bildschirm-Aufbau !
>     Screen.MousePointer = vbHourglass

>     Set m_report =
> CRW.Application.OpenReport("C:\SP\VBProgs\aida\Reports\ADM\deu\" &
> GetBerichteFeld(FrmAuswertung.CboBericht.Text, "Report"))

>     CRW.Database.LogOnServer (,,"provider=microsoft.jet.oledb.4.0; data
> source='" & DbPointer & "';")
>     CRW.Database.SetDataSource ("provider=microsoft.jet.oledb.4.0; data
> source='" & DbPointer & "';")



Tue, 07 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Change language setting to ..., Change default database to ...

2. Changing the database name in a append query

3. How to change connected database at runtime

4. vb6/MSDE when other users change the database.

5. Changing Active database in DataEnvironment at run time?

6. Saving changes to database from textboxes (includes free joke)

7. ComboBox Changes Access Database

8. How to change connected database at runtime

9. How to change system database before Access is started by a program

10. Changing the Database location at runtime for a report using OLE DB

11. Change Access database Location but data not refresh !!!

12. Change access database password

 

 
Powered by phpBB® Forum Software