|
-
Sep 7th, 2005, 11:24 PM
#1
Thread Starter
Hyperactive Member
Crystal LogonServer
Hi there
I'm using Crystal Report 9.2 to access to MS Access 2003
on my workgroup
the DB path is \\server1\db1.mdb and password of DB is 2005
How to use Report.Database.logonserver(....) ?
Does Any one has ever try Database.logonserver ?
Thanks for advance
-
Sep 7th, 2005, 11:31 PM
#2
Re: Crystal LogonServer
In the CR help files it will tell you which dll driver to use for Access and its syntax. This is an example of Access' DB logon info. 
VB Code:
oReport.Application.LogOnServer "P2SODBC.DLL", sServer, sDatabase, sUserName, sUserPwd
oReport.Database.Tables(1).SetLogOnInfo sServer, sDatabase, sUserName, sUserPwd
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 7th, 2005, 11:54 PM
#3
Thread Starter
Hyperactive Member
Re: Crystal LogonServer
oReport.Application.LogOnServer "P2SODBC.DLL", "\\server1", "db1.mdb", "administrator", "2005"
oReport.Database.Tables(1).SetLogOnInfo "\\server1", "db1.mdb", "administrator", "2005"
Is this correct ?
if that report has too many table, do i need to do this every table?
Thanks
-
Sep 8th, 2005, 12:04 AM
#4
Re: Crystal LogonServer
Without the double backslashes.
VB Code:
oReport.Application.LogOnServer "P2SODBC.DLL", "server1", "db1.mdb", "administrator", "2005"
oReport.Database.Tables(1).SetLogOnInfo "server1", "db1.mdb", "administrator", "2005"
You can iterate through the tables and setlogoninfo for each. I cant remember the exact syntax but its on the Forums. Try a quick search.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 8th, 2005, 12:18 AM
#5
Thread Starter
Hyperactive Member
Re: Crystal LogonServer
Thanks a lot man
-
Mar 28th, 2007, 03:59 AM
#6
Junior Member
Re: Crystal LogonServer
Hi Rob, What about I have the access with password in the local XP machine? in the server column what should I use?
Im still using Crystal 4.5 so it should be in:
myReport.LogOnServer "P2SODBC.DLL", "localhost", App.Path & "\database\myData.mdb", "admin", "1234"
This return me Unable to Logon server! Please help!
-
Mar 28th, 2007, 05:42 AM
#7
Re: Crystal LogonServer
Instead of localhost use the computer name. I'm not sure if its compatible with 4.5 but give the code a try.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 28th, 2007, 07:28 PM
#8
Junior Member
Re: Crystal LogonServer
Hi Rob, thanks for your advice, any how I has found another to logon the server:
Report.LogonInfo(0) = "dsn=myDSN;uid=admin;pwd=1234;dsq="
Eventhough is working but I much prefer not to use DSN if possible like to use coding, because we have to create the DSN on the other PC with the exact name in our code, if DSN currupted then will be a problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|