Does this look right to you

Results 1 to 3 of 3

Thread: Does this look right to you

  1. #1
    Ashy Guest

    Default Does this look right to you

    I have received the following from the support team who host my site. It is an example of how to connect to a database. However, I do not think that this code will work. Any one else have an opinion or sugggestion to fix it???<BR><BR>&#060;%<BR> con = Server.CreateObject("MySQL.Connection");<BR> con.Connect("localhost", "USERNAME", "PASSWORD", "MyDatabase", 3306, 0);<BR> sql = "select FirstName, LastName from Customers";<BR> if (!con.Query(sql))<BR> Response.Write("ERROR: ".concat(con.ErrMsg()));<BR> else<BR> {<BR>%&#062;<BR> <BR><BR>I know you have to replace USERNAME and PASSWORD but what the hell are those numbers at the end of the connection line??

  2. #2
    Linda N. Guest

    Default RE: Does this look right to you

    That looks *way* too complicated for what you want to do...suggest you get a good book on ASP Databases using SQL server and do it that way. THEN you will at least understand what you are doing rather than just copying and pasteing blindly. I got a good one at Barnes and Noble.

  3. #3
    Ashy Guest

    Default RE: Does this look right to you

    I think the ISP has no idea what they are doing because they are pretty new to it and think that they have set the system up incorrectly as the driver is not being recognised. I have a site working on another ISP and I thought the exact same as you. However I thought I would just check to see if it made sense to anyone else.<BR><BR>Thanks anyway....

Posting Permissions

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