Hi
I'm just wrapping back an ADP project, but am faced with dilemma.
Here's the situation.
* Have a test server: ServerA
* ADP compiled to ADE to use ServerA
* Test server ServerA changed to ServerB ===> CANNOT connect.
What are my options besides recompiling my ADP and redistributing it
to the users.
Does ADP have a mechanism by which I can change the Connection
properties?
The domain solution I have come up (untested) is to use DNS alias for
the ServerA, to which ADE will connect. As the machine changes, point
the alias to the new machine. Is this workable?
This of course brings me to the next big question? What to do with a
WorkGroup?
Thanx
Riyaz
riyaz.mansoor@gmail.com - 24 May 2007 07:45 GMT
I would like to add that i'm using Access 2003 SP2 to SQL Server 2000
Dim strConnect As String
strConnect = CurrentProject.BaseConnectionString
Debug.Print strConnect
strConnect = "PROVIDER=SQLOLEDB.1;Workstation
ID=1;PASSWORD=pass;PERSIST SECURITY INFO=TRUE;USER ID=GrMarine;INITIAL
CATALOG=GrandMarineOperations;DATA SOURCE=(local);Use Procedure for
Prepare=1;Auto Translate=True;Packet Size=4096"
' strConnect = Replace(strConnect, "Source=TestServer",
"Source=ProductionServer")
' CurrentProject.CloseConnection ' tried with and without
CurrentProject.OpenConnection (strConnect)
Debug.Print CurrentProject.BaseConnectionString
the result is: the output is somehow truncated and does not reflec the
changes (Workstation ID) that i've made.
PROVIDER=SQLOLEDB.1;PASSWORD=Gr2Marine6;PERSIST SECURITY
INFO=TRUE;USER ID=GrMarine;INITIAL CATALOG=GrandMarineOperations;DATA
SOURCE=(local);Use Procedure for Prepare=1;Auto Translate=True;Packet
Size=4096;Workstation ID=RIYAZMANSOOR
PROVIDER=SQLOLEDB.1;PASSWORD=Gr2Marine6;PERSIST SECURITY
INFO=TRUE;USER ID=GrMarine;INITIAL CATALOG=GrandMarineOperations;DATA
SOURCE=(local)
On May 24, 10:47 am, "riyaz.mans...@gmail.com"
<riyaz.mans...@gmail.com> wrote:
> Hi
>
[quoted text clipped - 20 lines]
> Thanx
> Riyaz
Tom Wickerath - 24 May 2007 08:12 GMT
just remove the workstation string from your connection string
it is an optional parameter; and yes-- if you overwrite it-- it will stay
overridden
> I would like to add that i'm using Access 2003 SP2 to SQL Server 2000
>
[quoted text clipped - 48 lines]
>> Thanx
>> Riyaz
riyaz.mansoor@gmail.com - 24 May 2007 08:42 GMT
> just remove the workstation string from your connection string
>
> it is an optional parameter; and yes-- if you overwrite it-- it will stay
> overridden
No. It does NOT get overwritten. Just in case this was a thing with
Access, I have checked the Host_Name on SQL Server and it is the old
name. Reading the posts, it seems that this is NOT possible.
Is this so?
Riyaz
Tom Wickerath - 24 May 2007 18:13 GMT
you're sticking a workstation name in the connection string
and then you're bitching that it's not showing the correct workstation name?
pull out the workstation name from your connection string!
>> just remove the workstation string from your connection string
>>
[quoted text clipped - 8 lines]
>
> Riyaz
'69 Camaro - 24 May 2007 18:39 GMT
Everyone please note that Aaron Kem.pf is attempting to impersonate one of
our regular posters again. Tom would never post such a message.
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
> you're sticking a workstation name in the connection string
<SNIPPED>
> pull out the workstation name from your connection string!
'69 Camaro - 24 May 2007 09:03 GMT
Everyone please note that Aaron Kem.pf is attempting to impersonate one of
our regular posters again.
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
> just remove the workstation string from your connection string
>
[quoted text clipped - 53 lines]
>>> Thanx
>>> Riyaz
Robert Morley - 24 May 2007 16:18 GMT
I can't help you with your main problem, but for the problem of the
Workstation ID not changing, this is a known limitation/bug in ADP projects.
Vadim Rapp came up with a workaround for this problem that seems to work
fairly well. If he doesn't respond to this post in a few days, post back to
this thread and I'll dig up his public e-mail address and send it to you
privately.
Rob
> I would like to add that i'm using Access 2003 SP2 to SQL Server 2000
>
[quoted text clipped - 48 lines]
>> Thanx
>> Riyaz
Tom Wickerath - 24 May 2007 18:13 GMT
Robert;
what the hell are you talking about, he just needs to pull the workstation
clause from his connection string
I mean seriously guys do you guys not understand how SQL Server works?
>I can't help you with your main problem, but for the problem of the
>Workstation ID not changing, this is a known limitation/bug in ADP
[quoted text clipped - 57 lines]
>>> Thanx
>>> Riyaz
'69 Camaro - 24 May 2007 18:40 GMT
Everyone please note that Aaron Kem.pf is attempting to impersonate one of
our regular posters again. Tom would never post such a message.
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
> Robert;
<SNIPPED>
> I mean seriously guys do you guys not understand how SQL Server works?
riyaz.mansoor@gmail.com - 25 May 2007 10:18 GMT
On May 24, 8:18 pm, "Robert Morley"
<rmor...@magma.ca.N0.Freak1n.sparn> wrote:
> I can't help you with your main problem, but for the problem of the
> Workstation ID not changing, this is a known limitation/bug in ADP projects.
> Vadim Rapp came up with a workaround for this problem that seems to work
> fairly well. If he doesn't respond to this post in a few days, post back to
> this thread and I'll dig up his public e-mail address and send it to you
> privately.
Thanks. I've figured it out. Workstation ID cannot be set - Access
resets it to the current machine_name. From postings on this group.
As for my other problem - CurrentProject.OpenConnection and
disconnected ADPs. A search on these terms in this news group yields
the answers.
thanks all.
Robert Morley - 25 May 2007 18:23 GMT
> Thanks. I've figured it out. Workstation ID cannot be set - Access
> resets it to the current machine_name. From postings on this group.
As I said, there *is* a solution available for that, if you really want it.
But by default, it always shows the same machine name. Alternatively, I
believe disconnecting and reconnecting in code will also work.
Rob
u3 - 25 May 2007 13:30 GMT
toi khong hieu gi het
> Hi
>
[quoted text clipped - 20 lines]
> Thanx
> Riyaz
Guy - 31 May 2007 04:34 GMT
Hi Riyaz,
If I understand your posting correctly you would like to change Servers
within your ADP from your Test to Production environment. Not sure whether
you require users to logon or want to hardcode these values, but I manage
this using a logon form that prompts the user for the:
Server
Username
Password
The server choices are shown in a combobox which is populated in the
Form_Open event by the following code:
============================
Private Sub Form_Open(Cancel As Integer)
Dim intI As Integer
Dim dmoApp As SQLDMO.Application
Dim dmoName As SQLDMO.NameList
On Error GoTo Form_Open_Error
Set dmoApp = New SQLDMO.Application
With dmoApp
' Get list of available SQL Server instances
Set dmoName = .ListAvailableSQLServers
With dmoName
For intI = 1 To .Count
cboServer.AddItem (.Item(intI))
Next
End With
End With
Set dmoName = Nothing
Set dmoApp = Nothing
Form_Open_Exit:
Exit Sub
Form_Open_Error:
MsgBox str(Err.Number) & " - " & Err.Description, vbCritical + vbOKOnly,
"Unexpected Error - Form_Open"
Cancel = True
Resume Form_Open_Exit
End Sub
===========================
Then it is just a simple matter of setting the connect string appropriately.
Hope this helps
Guy
> Hi
>
[quoted text clipped - 20 lines]
> Thanx
> Riyaz
Guy - 31 May 2007 04:40 GMT
Riyaz,
Sorry forgot to mention you need to set a reference to the Microsoft SQLDMO
library for this to work, but you will probably need this anyway if you want
to users to backup/restore/attach/detach/run SQL Maintenance procedures
against your database installed on the server.
Cheers
Guy
> Hi
>
[quoted text clipped - 20 lines]
> Thanx
> Riyaz