Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String DSN/UD4 Frustrations

Status
Not open for further replies.

jacknet

Programmer
Joined
Dec 30, 2001
Messages
23
Location
US
Has anyone addressed the issue of how you switch from developement to live as far as the connection is concerned? If you develope on your pc using pws you've set your connection dsn to work with the pws so you can test locally. But what about when you switch everything over to the web? Do you change your applications' path to the database with Modify> Connections in UD4 or do you simply insert the new string somewhere in your code. Do you have to use the Connection folder UD4 creates with the conn.asp you created. If so, where do you put it when you ftp your files. In the database folder? In html level files? Has anyone actually got UD4 to work on the web? There aren't any good instructions/tutorials out there to walk you this procedure. I've done 4 separate tutorials, including 2 from Macromedia and have yet to get anything to work. I'm not an idiot. I program 8 hrs a day on the as400 using rpg and db2. But trying to get this crap to work has been a nightmare. I have 6 weeks invested and have yet to be able to put up the simplest of database pages. If anyone knows of a simple (ha!) instruction or tutorial, that works, could you please pass it on. Thanks.
 
Hey Jacknet.

If you have your connection string set as "dsn=blah" to try to get it to work on your machine that's cool.

What it depends on is how you can connect to the database once its up on the server. DSN or DSN-Less

if you can do DSN, then no problem, dont worry about it it'll work slick. If it's DSN-less than you just need to modify to reflect the path - and you can change that script and upload only to the server...... that way you'll work in preview, plus when you upload files - it wont go connection WHAT? Hense - different connection scripts - but same connection name. THis you need to find out from your host, some allow one or the other - and rare few allow both.

As far as using UD4 on the web..... If you mean to upload pages, yes I have but to be honest I usually use a FTP client. I found UD4 to be slow, and if you don't have it set up correctly it'll put files in the wrong places. My fault for not setting it up correctly but I get impatient.

And for the connection folder - Yes and no. If you are going to use UD4 almost exclusively then yes - because it will make your life much easier. You don't have too - you can code your own connection. But it is alot easier to just have that include line rather than a connection script on every page.

Just upload it exactly how UD4 placed it in your directory tree structure. if you have it like root folder mydomain.com in that folder you have your files, than you'll see UD4 put a folder called connections right in your root - it will place it wherever it needs too based on your file locations. just upload as you would if it were say your image directory.

Dont stress out too much - theres plenty of help [morning]
 
Check out some of the sites below too. The issue of "do I DSN or DSN-less?" is one long debated, but I am sure that the others will agree; if you choose to use an ISP to host your site and have limited control over the server itself, I have found that being able to code a DSN-less connection is more flexible and less fuss (in terms of dealing with the lovely tech folk at ISP call centres!) than dealing with DSN connections (some ISPs don't allow them or allow one or two at most). BUT, if you do have access or some modicum of control over the server then there's no reason not to choose DSN level connections, they are robust and quicker (a bit) than DSN-less connections. You'll find that a lot of folk prefer one or the other (depending on their experience).

There are some good instruction tutorials out there, some can be found at;




This may seem a little overkill, however I found it worth taking a cross section of all the tutorials so I could eventually find out which I liked best.

IF you've got any coding problems, post them and we can try and help you out.

M
 
Just tell me where you put:
MM_connFamily_STRING = "dsn=familydb;"
Currently it resides in connFamily.asp in the Connections folder. Where do you guys put it?
 
IF your page that requests data from the db has the include file in the pre-header, i.e.
<!--#include file=&quot;../Connections/connFamily.asp&quot; -->
Actually resides in the Connections folder then you should be fine. Give it a quick test in UD when you select the connection in the recordset window, if it works OK there, then perhaps the direction to the actual file has gone a bit awry.

let us know how you get on.

M
 
taking this to thread

thread770-228684
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top