List Info

Thread: Re: Website maintance




Re: Website maintance
user name
2007-01-11 18:30:59
If you don't somehow use your new specialsystem.mdw name it
will assume=20=

the default system.mdw is to be used.

There maybe other ways to do this, say in Excel by using VBA
code for=20
example as a macro and coding in the connection string with
the=20
accompanying .mdw file. And then use TransferDatabase or
equivalent.

Here is another way. Create a UDL file otherwise known as a
DSN connectio=
n,
then instead of pointing at your .mdb file as the data
source, point it a=
t your=20
newly created .udl file.
=20
'Code to create .udl file

Public Sub MakeUDL()
' add a reference in your project to 'Microsoft OLE DB
Service
'Component 1.0 Type Library' and Microsoft Scripting
Runtime
'you can create an object as MSDASC.Datalinks
'Call the .PromptNew method to create a new link.  The
method brings up t=
he
'common dialog for creating oledb links and returns a
properly formatted
'connection string.
' You can check created file by opening in Notepad or double
clicking on =
file in=20
windows explorer
'set scripting runtime library reference for FSO

    Dim objDL As MSDASC.DataLinks
    Dim fso As FileSystemObject
    Dim tStream As TextStream

    Set objDL =3D New MSDASC.DataLinks
    Set fso =3D New FileSystemObject
    Set tStream =3D fso.OpenTextFile("C:access
filestest.udl", _
              ForWriting, True, TristateTrue)
'tristatetrue=3Dunicode!
  tStream.Write "[oledb]" & vbCrLf
  tStream.Write "; Everything after this line is an OLE
DB connection str=
ing" & _
       vbCrLf
  tStreamWrite
"Provider=3DMicrosoft.Jet.OLEDB.4.0;" & _
           "Data Source=3Dc:somepathmydb.mdb;"
& _
           "Jet OLEDB:System Database=3DMySystem.mdw;
" & _
           "User Id=3DmyUsername;" &
"Password=3DmyPassword" & vb=
CrLf
    ' this will overwrite prexisting udl file
    tStream.Write objDL.PromptNew & vbCrLf
    tStream.Close
    Set tStream =3D Nothing
    Set fso =3D Nothing
    Set objDL =3D Nothing
End Sub

It is also possible to do this with Notepad open up a blank
file and save=
 in=20
Unicode format as test.udl . Now double click on test.udl in
win explorer=

and follow the DSN wizard selecting Jet 4.0 provider and the
name of the =
mdb=20
on the next panel, but there is nowhere to insert an mdw so
you will have=
 to=20
add this in notepad later as above.

Here is a site that has a whole slew of example connection
strings
You can use this method to create a udl for Oracle or SQL
Server

http://www.carlprothman.net/Technology
/ConnectionStrings/OLEDBProviders/t=

abid/87/Default.aspx



On Thu, 11 Jan 2007 17:11:41 +0200, Kantor Marc=20
<marcSENIORSFINANCE.CO.ZA> wrote:

>I'm using Access 2003 on Win XP. The application has
user level security=

>and my username (Kantorm) belongs to the admin rights.
>=20
>When I try to open a data source from any other office
application and
>select this particular database, the Data link
properties window
>appears. Under "Enter information to log onto
database", it defaults to
>Admin and blank password. I have tried connecting to the
db with this,
>but I have also tried putting my username and password
in, but I always
>get the following error regardless of the different
permeatations I use:=

>=20
>You do not have the necessary permissions to use the
"my
>application.mdb" object. Have your system
administrator or the perosn
>who created this object establish the appropriate
permissions for you.
>=20
>I am the system administrator and I am the person who
created it.
>=20
>Marc
>
>--------------------------------------------------------
----------------=
--
>The ACCESS-L list is hosted on a Windows(R) 2000 Server
running L-Soft
>international's LISTSERV(R) software.  For
subscription/signoff info
>and archives, see ht
tp://peach.ease.lsoft.com/archives/access-l.html .
>                             COPYRIGHT INFO:
>http://pe
ach.ease.lsoft.com/scripts/wa.exe?
SHOWTPL=3DCOPYRIGHT&L=3DACCESS-L

------------------------------------------------------------
--------------
The ACCESS-L list is hosted on a Windows(R) 2000 Server
running L-Soft
international's LISTSERV(R) software.  For
subscription/signoff info
and archives, see ht
tp://peach.ease.lsoft.com/archives/access-l.html .
                             COPYRIGHT INFO:
http://peach.ease.lsoft.com/scrip
ts/wa.exe?SHOWTPL=3DCOPYRIGHT&L=3DACCESS-L

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )