Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 08-24-2005, 10:42 PM Asp ???
Experienced Talker

Posts: 36
Trades: 0
My hosting company swears that I should be able to connect to a MySQL DB located on their server. To prove it they uploaded an ASP script. What the hell IS this?

Code:
<%

set Conn = server.CreateObject("ADODB.connection")

 

conn.connectionstring = "dsn=kmaster;"

conn.open

 

 

dim rs,sql

set rs = server.CreateObject("adodb.recordset")

sql ="Select * From master"

rs.open sql, conn

do until rs.eof

            response.Write(rs(0) & "<br>")

            rs.movenext

            loop

rs.close

 

 %>
phillyhotshots is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-25-2005, 03:35 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's asp code connecting to a database using a DSN (Data Source Name)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-25-2005, 05:02 AM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
And what is complaint about anyway?
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 08-25-2005, 02:27 PM
Experienced Talker

Posts: 36
Trades: 0
Well I can't connect via phpMyAdmin or MySQL Admininistrator. This script supposedly proves that it's not on their end. I'm not familiar with ASP, but when I run this page, it just displays...

1
2

What is that supposed to mean to me? Nowhere in the script does it specify the host, user, pass, etc.
phillyhotshots is offline
Reply With Quote
View Public Profile
 
Old 08-25-2005, 04:19 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Well, as it's ASP you wouldn't expect PHPAdmin to work really.

The hostname and user etc is setup in the DSN which you may be able to set up via your hosting control panel or the host would set it up for you.

but you can soon setup a DSNLess Connection. This is how I set mine up
Code:
const SQLServerName = "hostname"  
const SQLUserName = "username"
const SQLPassword = "password"
const SQLDatabase = "database_name"  

dim strSQLConnString
strSQLConnString = "driver={MySQL ODBC 3.51 Driver}"
strSQLConnString = strSQLConnString & ";server="
strSQLConnString = strSQLConnString & SQLServerName
strSQLConnString = strSQLConnString & ";uid="
strSQLConnString = strSQLConnString & SQLUserName
strSQLConnString = strSQLConnString & ";pwd="
strSQLConnString = strSQLConnString & SQLPassword
strSQLConnString = strSQLConnString & ";database="
strSQLConnString = strSQLConnString & SQLDatabase
strSQLConnString = strSQLConnString & ";option=16387"
Take a look at ASP101 for their database samples and welcome to the world of real programmers not that home grown php stuff (just kidding guys)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-26-2005, 06:22 PM
kline11's Avatar
SearchBliss Web Tools

Latest Blog Post:
Oracle Embraces the Cloud
Posts: 1,724
Name: John
Location: USA
Trades: 0
The 1 and 2 are the scripts "Response.Write" results from looping through the record sets and displaying them "1 & 2" (starting with 0 and adding 1). It's only purpose it seems is to prove to you that you can connect to a DataBase
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
kline11 is offline
Reply With Quote
View Public Profile
 
Old 08-29-2005, 03:11 AM
Novice Talker

Posts: 12
Location: Denver, Colorado
Trades: 0
Have you asked your hosting company if they even support PHP? A lot of windows machines don't even bother . . . until clients specifically ask for it. If they do support PHP, please tell and I will look into your issue further.
__________________

Please login or register to view this content. Registration is FREE
:: A denver based web design, web marketing, and asp development company.
ccdesigns is offline
Reply With Quote
View Public Profile Visit ccdesigns's homepage!
 
Old 08-29-2005, 08:59 AM
kline11's Avatar
SearchBliss Web Tools

Latest Blog Post:
Oracle Embraces the Cloud
Posts: 1,724
Name: John
Location: USA
Trades: 0
I believe he was inquiring about ASP not PHP.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by kline11; 08-29-2005 at 08:59 AM.. Reason: misspelling
kline11 is offline
Reply With Quote
View Public Profile
 
Old 08-29-2005, 07:46 PM
Novice Talker

Posts: 12
Location: Denver, Colorado
Trades: 0
Quote:
Originally Posted by phillyhotshots
Well I can't connect via phpMyAdmin or MySQL Admininistrator. This script supposedly proves that it's not on their end. I'm not familiar with ASP, but when I run this page, it just displays...
I was referring to this line that he wrote after his original post which implies that he was trying to connect using PHP - but his company gave him sample ASP code which means that he is on a windows box.
__________________

Please login or register to view this content. Registration is FREE
:: A denver based web design, web marketing, and asp development company.
ccdesigns is offline
Reply With Quote
View Public Profile Visit ccdesigns's homepage!
 
Old 08-30-2005, 08:16 AM
kline11's Avatar
SearchBliss Web Tools

Latest Blog Post:
Oracle Embraces the Cloud
Posts: 1,724
Name: John
Location: USA
Trades: 0
Got it. He need to connect via ASP. PHP on a windows server is great for giving away code.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
kline11 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Asp ???
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23169 seconds with 12 queries