SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 43 of 43
  1. #26
    Yugo full of anvils bronze trophy hillsy's Avatar
    Join Date
    May 2001
    Location
    :noitacoL
    Posts
    1,859
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HILLSY: What do you need on a server to host CF pages? I know for ASP you need IIS (or PWS for 9x) and you need PHP xtensions 4 PHP, do you need CF xtends for CF?
    Ooops - been a while since I checked this thread

    In case you still want to know, you need to run the ColdFusion app server on your webserver (like PHP) to enable ColdFusion code extensions (CFML).

    That's the downside to ColdFusion - the full version costs a bomb - there is a freeware version which I also use on a regular basis though. It's super-dooper for quick'n'simple database sites and integrates very nicely with Access in particular.

    ColdFusion works with most major webservers I think. Certainly with PWS, IIS and Apache.
    that's me!
    Now A Pom. And a Plone Nut
    Broccoli Martinez Airpark

  2. #27
    SitePoint Enthusiast The Criminologist's Avatar
    Join Date
    Jun 2001
    Location
    Newtown, PA
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was in the same position where I needed to create a site using ASP and VBScript to connect to not only an Access DB but also a FoxPro DB, all without SQL. Not just for a personal site, but to create a modular, modifiable, e-commerce engine. I can say I have learned a LOT about the workings. And the greatest resource I came across, and it had been mentioned before was http://www.4guysfromrolla.com. They had some great articles for starters.

    I use ASP and IIS because I feel it is the least expensive method of hosting my sites at least. I am learning other technologies, but I still love Microsoft!
    C:\DOS
    C:\DOS\RUN
    RUN\DOS\RUN
    When all else fails, use Percussive Maintenance!

  3. #28
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hillsy: Is there a limit as to how long you can use the CF freeware for? Also, for PHP, what do I need to get?

    -Ryan

    PS: thanks guys for (again) for all the replies
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  4. #29
    Yugo full of anvils bronze trophy hillsy's Avatar
    Join Date
    May 2001
    Location
    :noitacoL
    Posts
    1,859
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a limit as to how long you can use the CF freeware for?
    No limit
    that's me!
    Now A Pom. And a Plone Nut
    Broccoli Martinez Airpark

  5. #30
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So is it one of those "please register if you continue to use" things?

    -Ryan
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  6. #31
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    template problems

    I am attempting to make my site use a template driven by a database.

    I *thought* I had found the perfect article.

    I used his example first. I typed everything in word for word. I did everything, except copy/paste. But it doesn't work?
    Here is the tutorial (no worry it's short): http://www.4guysfromrolla.com/webtech/062799-2.shtml

    here is the error I am getting
    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    /template.asp, line 8
    here is my code
    set cnADO = Server.CreateObject("ADODB.Connection")
    dsnDSN = "DSN=\databases\db2.mdb"
    cnADO.Open dsnDSN <--***line 8***
    set mySQL = "SELECT * FROM EMPLOYEES WHERE ID=" & Request.QueryString("EmpID")
    set rsTemp = cnADO.Execute(mySQL)
    If I change my code (for conn to database) to:
    set cnADO = Server.CreateObject("ADODB.Connection")
    dsnDSN = "DRIVER={Microsoft Access Driver (*.mdb)};" &_
    "DBQ=D:\Inetpub\wwwroot\databases\data.mdb;DefaultDir=;UID=;PWD=;"
    cnADO.Open dsnDSN
    set mySQL = "select FullName, PicURL, Duties, PicCaption FROM EMPLOYEES WHERE ID=" & Request.QueryString("EmpID")
    set rsTemp = cnADO.Execute(mySQL)
    I get this error:
    Error Type:
    Microsoft VBScript runtime (0x800A01A8)
    Object required: '[string: "select FullName, Pic"]'
    /template.asp, line 10
    My template is named template.txt
    My ASP file is named template.asp
    My database is in a folder called "databases" inside my "wwwroot" folder & is named db2.mdb.

    Thanks in advance,
    Ryan
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  7. #32
    Yugo full of anvils bronze trophy hillsy's Avatar
    Join Date
    May 2001
    Location
    :noitacoL
    Posts
    1,859
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by riddelrp
    So is it one of those "please register if you continue to use" things?

    -Ryan
    Nope. Free. $0. No more to pay.

    The way Allaire/Macromedia justify this is by providing only a subset of functionality and providing connectivity to only low end databases (e.g. Access).

    I think the idea is that it gets people using the ColdFusion platform. Otherwise ColdFusion would lose a lot of ground to the free solutions out there - ASP, PHP, JSP. If you then need to scale your site to tens of thousands of users, Macromedia has no problem with selling you a copy of ColdFusion Professional/Enterprise

    That said, I generally find that the freeware version does all I need (unless you start getting really complicated with your database work). And its integration with Access is top-notch. About three lines of code to connect to the database, run a query and return the results. Try that with ASP
    that's me!
    Now A Pom. And a Plone Nut
    Broccoli Martinez Airpark

  8. #33
    Yugo full of anvils bronze trophy hillsy's Avatar
    Join Date
    May 2001
    Location
    :noitacoL
    Posts
    1,859
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an example of how much better ColdFusion is:

    Code:
    <CFQUERY NAME="mySQL" DATASOURCE="data">
    SELECT FullName, PicURL, Duties, PicCaption 
    FROM EMPLOYEES 
    WHERE ID= '#URL.EmpID#' 
    </CFQUERY>
    <CFOUTPUT>The employee's name is #mySQL.FullName#</CFOUTPUT>
    Isn't that much nicer than ASP?
    that's me!
    Now A Pom. And a Plone Nut
    Broccoli Martinez Airpark

  9. #34
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Me likes

    That is about 10 times more simple to read then the asp stuff.

    However, I am getting used to ASP (it isn't that bad),and wonder if the extra "complexity" of ASP offers more advanced possibilities for the future.

    I mean, I understand you can get a more functional CF for some [maybe a lot of] $$$, but I am just 19 and about to start my 2nd year in college. I am doing things that usually wouldn't be done on a site my size so I may learn. An example is that my site will only consist of maybe 50-80 pages max. Databasing and templates are pretty much a waste of time on such a small site that will only be updated about once a month. However, "knowledge is power," and I like power

    I don't mean to crap on CF, and i do appreciate your help. I just don't have $$$ to spend on something that I can do for free (*cough* poor college kid ).

    My main objective in this is to gain marketable skills, but without adding cost. Lets say that *full* CF cost 100 USD. I can I not afford this. Also, how could I ask an employer to pay for this on top of me instead of going with say an ASP developer of the same price - the 100 for the CF license?

    Thanks,
    Ryan
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  10. #35
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ryan,

    The error when you try to use a DSN is because you're specifying a path to the DB when you should just be specifying a DSN name. To set up a DSN open the Control Panel and open the OBDC Data Sources to set up a DSN to your mdb file. You then use the name you specify for the datasource in your ASP script.

    dsnDSN = "DSN=myDSN"

    (In Win2000 you have to go to Control Panel > Adminstrative Tasks > ODBC Data Sources. I think this right but my memory may be failing me.)

    Try the following link for info on setting up DSNs.
    http://www.learnasp.com/learn/

    The error you're getting when trying to use the DSN'less connection is coming from using the 'Set' statement which sets variable to reference an object, but you've only got a string.

    set mySQL = "select FullName, PicURL, Duties, PicCaption FROM EMPLOYEES WHERE ID=" & Request.QueryString("EmpID")


    I know that the 4GuysFromRolla exmple uses the Set statement but it's wrong. Just remove the Set statement and I don't think you'll get the error anymore.

  11. #36
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to format the ASP stream so that when you
    "View Source" the final page you don't get a line of code that is 50,000 pages WIDE?


    PS: in the example they use a "memo field" for the "duties." They then sort the duties so that each "duty" is on its own line ala "br" tags. This was giving me an error saying that "replace" cannot be used in the manor I wished. So I changed the duties field to a text field. This solved my problems, but it created new ones. It made it so that I can only have 255 characters in the duties field. Can I put html tags in the database or is this considered "poor coding?"

    Thanks,
    Ryan
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  12. #37
    Yugo full of anvils bronze trophy hillsy's Avatar
    Join Date
    May 2001
    Location
    :noitacoL
    Posts
    1,859
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, how could I ask an employer to pay for this on top of me instead of going with say an ASP developer of the same price - the 100 for the CF license?
    Ryan,

    You make some good points. CF is pretty much entrenched in the e-commerce/business space. I don't know many home users who have it or "casual users" who use it - which is why they introduced the free one I think. $US100 is a bit cheap - try $US1295

    I don't think it's valid to say that CF skills are less marketable though. For a large company, TCO (Total Cost of Ownership) is important and the purchase price is only a small fraction of that. Other factors are support, ease of use, integration with legacy systems etc.

    CF really shines in the ease of use department. Put simply, workable applications can be developed in less time with ColdFusion, and often by people with little/no programming experience. If you're paying an employee/contractor megabucks to build a website, chances are you'll want them to finish it pretty fast

    Hence, you'll find CF in a lot of companies who aren't concerned about the price of the software, but are still very concerned about their bottom line. And if the company already uses CF (many do), then the decision's a no-brainer.

    So by all means learn ASP. It's a very marketable skill(more so than PHP ) But it definitely won't hurt your marketability to have a look at CF either. And it's free to download and super-easy to use.

    Happy coding!

    <edit: should also point out that there are free and low cost webhosting companies around that support CF if you want to play with the full version...>
    Last edited by hillsy; Jul 21, 2001 at 22:25.
    that's me!
    Now A Pom. And a Plone Nut
    Broccoli Martinez Airpark

  13. #38
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the reply,

    Didn't think about the fact that even though it is $1295, if it takes less time then it can be cheaper in the long run :-).

    Well, I think I'll stick to ASP for the moment, then try CF and maybe even PHP after that just for fun [depends on how much time I have on my hands].

    Thanks everyone.

    PS: for areas in my template (suchas the main body of the site) I have to use Memo fields since text is limited to 255 characters right?

    PPS: I just got it to edit the memo field. I deleted the table, remade it and . . . it worked!

    YAY
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  14. #39
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    nope!

    nevermind, when I remade the table it switched the [duties] field to a text box so it worked. How do I get these stupid memo boxes to print right?!

    frustrated,
    Ryan
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  15. #40
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ryan,

    I think the problem with the memo field may be explained in the following link. Try changing the sql string so that memo field is the last field in the select list.
    http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=80

    Regarding the source output try changing the following line

    duties = replace(rsTemp("duties"), vbCrLf, "<br>")

    to:
    duties = replace(rsTemp("duties"), vbCrLf, vbCrLf & "<br>")

    There'd still be a problem if you have a large section of the duties field that doesn't have any line breaks (vbCrLf). You could get around this by inserting some vbCrLf's into the duties string variable at xxx number of characters. This would add some overhead to the script though.

    Code:
    Function WrapText(strText, intWrapLength)
    	
    	intTextLength = Len(strText)
    	iPosition = 1
    	strNewText = ""
    	Do While iPosition < intTextLength
    		
    		strTemp = Mid(strText, iPosition, intWrapLength) & vbCrLF
    		strNewText = strNewText & strTemp
    		
    		iPosition = iPosition + intWrapLength
    	Loop
    	
    	WrapText = strNewText
    End Function
    
    strText = "This tutorial revolved around using 1 ASP page to create a " & _
    "website of hundreds, maybe thousands of pages, based on a template file. " & _
    "I will discuss using 1 ASP page and a querystring, but in theory, you could " & _
    "create a component that would create individual pages instead of dealing with " & _
    "one, using the FileSystemObject. Who knows, I might write a tutorial on that someday."
    
    Response.Write strText
    Response.Write "<br><br>"
    Response.Write Wraptext(strText, 50)

  16. #41
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    still hitting walls

    here is my template.asp page code

    <%
    If Request.QueryString("EmpID") = "" Then
    Response.Redirect "tester.asp"
    End If

    set cnADO = Server.CreateObject("ADODB.Connection")
    dsnDSN = "DRIVER={Microsoft Access Driver (*.mdb)};" &_
    "DBQ=D:\Inetpub\wwwroot\databases\db2.mdb;DefaultDir=;UID=;PWD=;"
    cnADO.Open dsnDSN
    mySQL = "select FullName, PicURL, PicCaption, Duties FROM EMPLOYEES WHERE ID=" & Request.QueryString("EmpID")
    set rsTemp = cnADO.Execute(mySQL)
    %>
    <html>
    <head>
    <title><%=rsTemp("FullName")%></title>
    </head>
    <body>
    <%
    set fso = Server.CreateObject("Scripting.FileSystemObject")
    set ourtext = fso.GetFile("d:\inetpub\wwwroot\template.txt")

    set ts = ourtext.OpenAsTextStream(1,-2)

    Do while not ts.AtEndOfStream
    myText = ts.readline
    myText = replace(myText, "%img%", rsTemp("picURL"))
    myText = replace(myText, "%name%", rsTemp("FullName"))
    duties = replace(rsTemp("duties"), vbCrLf, vbCrLf & "<br>")
    myText = replace(myText, "%duties%", duties)
    myText = replace(myText, "%empID%", Request.QueryString("EmpID"))
    myText = replace(myText, "%date%", rsTemp("PicCaption"))
    Response.Write myText
    Loop

    set ts = nothing
    set ourtext = nothing
    set fso = nothing
    rstemp.close
    set restemp = nothing

    cnADO.close
    set cnADO = nothing
    %>

    </body>
    </html>
    My template.txt file is exactly the same as "4 Guys'" tutorial. I can post it if you want.

    My database is setup in the following manner:
    ID(autonumber), FullName(text 255 limit), PicURL(text255 limit), PicCaption(text 255 limit), Duties(memoField).

    Thanks guys,
    Ryan
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  17. #42
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I might know what is wrong

    Pulling from the ASP tutorial Shane posted, I think that the memoField is getting screwed by the double hits.

    It can only be used once right?

    So then the duties = ...
    followed by the mytext=...

    the rsTemp("duties") is hit 2 times, the second returning a "null" which is invalid to use in the "replace" function.

    My question would be if I eliminated the command to enter the "br" tag would it be cool, or can you not involve the memoField in a loop since it is checked each time?

    PS: I just commented out the insert break line and the page loaded, but duties didn't print

    At least it is somewhat loading now!
    Ryan

    thanks again
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.

  18. #43
    SitePoint Zealot
    Join Date
    Jul 2001
    Location
    Grosse Pointe Farms, MI
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    it works!

    I made the variable "duties" = rsTemp("Duties") before the loop.

    Then I just refered to duties instead of rsTemp("Duties")

    Man I should of figured that out a while ago.

    Thanks guys,
    Ryan Riddell
    Michigan looks like your left hand . . . half way between your wrist and the base of your thumb is where I live.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •