PDA

View Full Version : AlphaADO string change


ABC123

NicholasWieland
04-25-2008, 06:23 PM
If I have the following alphaADO connection for my dev PC
but have to change for produiction the server can I do that
afterwards?
{A5API='SQLServer',Server='edfies',UserName='sa'}
Nick

Selwyn Rabins
04-25-2008, 07:02 PM
If I have the following alphaADO connection for my dev PC
but have to change for produiction the server can I do that
afterwards?
{A5API='SQLServer',Server='edfies',UserName='sa'}
Nick


yes.

we always recommend that you use "NAMED" connection strings in all your work so that you can make one change and your whole app now points to a different server.

NicholasWieland
05-23-2008, 12:29 PM
yes.

we always recommend that you use "NAMED" connection strings in all your work so that you can make one change and your whole app now points to a different server.

Yes I understand that, with that being said.

The question is I installed the webapp server yesterday on a machine and will have to ftp all files for the web app, so with that being said "HOW DO I CHANGE THE NAMED CONNECTION FROM WHAT IS ON MY DEV PC TO THE REAL CONNECTION ON THE WEBSERVER?

Is there a file I can edit? once on the webapp server machine?
what is the procedure?

Thanks
Nicholas

Selwyn Rabins
05-23-2008, 01:08 PM
Yes I understand that, with that being said.

The question is I installed the webapp server yesterday on a machine and will have to ftp all files for the web app, so with that being said "HOW DO I CHANGE THE NAMED CONNECTION FROM WHAT IS ON MY DEV PC TO THE REAL CONNECTION ON THE WEBSERVER?

Is there a file I can edit? once on the webapp server machine?
what is the procedure?

Thanks
Nicholas

I am a little confused about what the question concerns.

Are you talking about web components (grids and dialogs) that you built and then published?

Assuming you are talking about web components, I assume that you built them using AlphaDAO?

When you built them, are you saying that instead of using named connection strings, you used explicit connection strings?

(note there there has been a change from v8 to v9 in how grid components use named connections. if you edit your grid, and go to the xbasic tab, what does the 'connection string' property show? does it show a named connection string, or an explicit connection string? if it does not show a named connection string, you should edit the grid to use a name connection on the 'query' tab and then resave it).

If you use named connection strings (recommended), then the named connection strings are resolved at RUNTIME by reading values from a5_application.a5i file. This file is automatically published whenever you publish any page in a project.

The .a5i file has the real connection string for any named connection. You can simply edit the values in the .a5i file in your web root.

(Be aware however that if you manually edit the.a5i file in your web root, it will get overwritten the next time you publish any files).

The .a5i file is constructed using the connection strings defined in your publishing profile. I.e. for each named connection, you specify what the actual connection string is for that profile.

for example, you might have a named connection called 'SQLServerMain'

you might have two profiles: server1 and server2

you will specify the actual connection string to use for the named connection 'SqlServerMain' when publishing to 'server1' and when publishing to 'server2'. The connection string might be the same for both profiles, or it might be different. Your choice.

i don't know if I have answered your question.

if not can you provide more details.

NicholasWieland
05-23-2008, 02:07 PM
The .a5i file has the real connection string for any named connection. You can simply edit the values in the .a5i file in your web root.

(Be aware however that if you manually edit the.a5i file in your web root, it will get overwritten the next time you publish any files).

The .a5i file is constructed using the connection strings defined in your publishing profile. I.e. for each named connection, you specify what the actual connection string is for that profile.
i don't know if I have answered your question.

if not can you provide more details.

Yes it answers it 50% file name but editing it see below.
Dim _AlphaDAO_ConnectionStrings as c
_AlphaDAO_ConnectionStrings = <<%txt%
koster01|Encrypted:3MLNR/D8BLbOLVyV2vnymt1pstzTdnyrt3EogS83Q6LpP6rkW9wwbxjdH0eWIqzIQUm3W/0tZx9TyuvZ3QDPomOf7//eDKS6
Koster02|Encrypted:3MLNR/D8BLbOLVyV2vnymt1pstzTdnyrt3EogS83Q6LpP6rkW9wwbxjdH0eWIqzIQUm3W/0tZx9TyuvZ3QDPoj5JZJFdwqTK
%txt%

the name koster01 or 02 however can be changed but.....
{A5API='SQLServer',Server='edfies',UserName='sa',Database='new001'}
server= needs to change
database=needs to change
since it is encryped above in the a5i.file how to change?

Thanks
Nicholas

Selwyn Rabins
05-23-2008, 02:23 PM
Yes it answers it 50% file name but editing it see below.
Dim _AlphaDAO_ConnectionStrings as c
_AlphaDAO_ConnectionStrings = <<%txt%
koster01|Encrypted:3MLNR/D8BLbOLVyV2vnymt1pstzTdnyrt3EogS83Q6LpP6rkW9wwbxjdH0eWIqzIQUm3W/0tZx9TyuvZ3QDPomOf7//eDKS6
Koster02|Encrypted:3MLNR/D8BLbOLVyV2vnymt1pstzTdnyrt3EogS83Q6LpP6rkW9wwbxjdH0eWIqzIQUm3W/0tZx9TyuvZ3QDPoj5JZJFdwqTK
%txt%

the name koster01 or 02 however can be changed but.....
{A5API='SQLServer',Server='edfies',UserName='sa',Database='new001'}
server= needs to change
database=needs to change
since it is encryped above in the a5i.file how to change?

Thanks
Nicholas


the entries in the .a5i file are encrypted when a5 writes the file. but they don't have to be encrypted. they can be entered in plain text. just enter the exact connection string that you want, and leave out the 'Encrypted:' prefix.

e.g.

Koster02|{A5API='SQLServer',Server='edfies',UserName='sa',Database='new001'}


the .a5i file is not accessible to anyone using your application, so your passwords are not vulnerable.

NicholasWieland
05-23-2008, 05:01 PM
the entries in the .a5i file are encrypted when a5 writes the file. but they don't have to be encrypted. they can be entered in plain text. just enter the exact connection string that you want, and leave out the 'Encrypted:' prefix.

e.g.

Koster02|{A5API='SQLServer',Server='edfies',UserName='sa',Database='new001'}


the .a5i file is not accessible to anyone using your application, so your passwords are not vulnerable.

Thanks that was what I needed.......
I also assume I could change the string in Alpha then save/publish immediately and the .a5i would have correct strings