1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Please suggest me...

Discussion in 'C#' started by JEET, Mar 11, 2007.

  1. #1
    Hi,
    I am just starting to learn ASP. I know PHP, and a bit of VB as well...
    I'm confused about a few things though and would really appreciate someone suggesting something...

    Which database handling should I learn with ASP? I know MYSQL...

    What about MS-ACCESS simple file databases, connected using ADO?
    Can I just make a ms-access file on my pc and upload it on web server, or do I sound totally stupid? ;)

    While looking for some hosting providers, found that most provide MSSQL and ms-access.

    Kindly suggest how to continue with this...

    Also, can I install mssql, or sql on my xp running IIS?
    Thanks :)
     
    JEET, Mar 11, 2007 IP
  2. JenniP

    JenniP Peon

    Messages:
    250
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Unless you have a specific need to learn ASP, learn ASP.NET instead, it makes life a lot easier as so much is done for you, although you will find classic ASP closer to PHP.

    Its normally best to use Microsoft SQL Server, rather than Access or MySQL, but any of them is pretty much the same in ASP apart from the database connection string.

    While you could just upload an MS Access file, Access isnt really designed for use in websites unless you are expecting a very low number hits.

    And finally use you can install SQL Server (SQL Server 2005 Express is a free product) on XP, and if your using ASP.NET 2.0 and your hosts supports SQL Express uploading your database is as it would be with access.

    Jen
     
    JenniP, Mar 11, 2007 IP
  3. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #3
    Hi Jen,
    Thanks for the advise. MS-SQL is what I'm planning on as well. All the web host I have contacted so far support both ms-sql and ms-access...
    You are pretty right about classic asp being similar as php. I'll probably learn asp first and when good enough, will move on to asp.net

    BTW, do you know how to strip all html tags from a string submitted using a form? (in asp)
    Thanks :)
     
    JEET, Mar 11, 2007 IP
  4. JenniP

    JenniP Peon

    Messages:
    250
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    JenniP, Mar 11, 2007 IP
    JEET likes this.
  5. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #5
    Go with MsSQL, Access only allows about 10 conncurrent connections. A tip when using Classic ASP and DB's - use GetRows - it converts to 2-dim array... and you can kill your connect to DB before anything is even rendered. I would definitely use aSP.NET - it'll flip yo' lid :)

    ASP and PHP are pretty similar, just gotta learn different syntax.
     
    ccoonen, Mar 12, 2007 IP
    JEET likes this.
  6. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #6

    Nice! :) The first one works just great!
    Thanks for this. :)
    rep added.

    Just 1 more thing. Can you please tell me what's wrong with the following code. It's supposed to run a sql query to ms-access db.
    I think the connection is fine, as I didn't get any error message with just the connection code, but when added the query, gives me a "syntax" error...

    error:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.


    And here's the code:
    -------
    sql= "INSERT INTO TABLE Addresses VALUES('','first','last','location')":
    Conn.Execute sql
    ------


    The values first, last etc are not "variables", but values I want in the DB.

    I'm also having a very hard time forming a "create table" query... Same type of syntax errors...
    (I'm used to creating tables using php scripts, rather than running a sql code in phpmyadmin)

    Thank you :)
     
    JEET, Mar 12, 2007 IP
  7. JenniP

    JenniP Peon

    Messages:
    250
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Try

    -------
    sql= "INSERT INTO Addresses VALUES('','first','last','location')":
    Conn.Execute sql
    ------

    I dont think you need "TABLE", just the name of the table to be inserted into.

    Jen
     
    JenniP, Mar 13, 2007 IP
  8. Oriane

    Oriane Peon

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Indeed, the TABLE keyword is not needed. A better syntax would be :

    sql= "INSERT INTO Addresses(firstfield,secondfield,thirdfield,fourthfield) VALUES('','first','last','location')":
    Conn.Execute sql

    firstfield,secondfield,thirdfield,fourthfield being the field names in your table where the data will go.
     
    Oriane, Mar 18, 2007 IP