Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Sep 2005
    Location
    austin
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy [ODBC Driver Manager] Data source name not found and no default driver specified

    I have two zip files which compose a website, which previously was working [at a different host, under a different webmaster], but now is not.

    The code hasn't been changed, all of the files have been unzipped/uploaded to an .asp friendly host.

    Default.asp works fine, but when I try to log in, I receive the following message:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    /website/db_open.asp, line 8


    ...Does anyone have a clue what's going on?

    Please, and thank you!
    Last edited by vicksen; 09-14-2005 at 07:39 AM. Reason: -composition-

  • #2
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could you post line 8, so that we can see your connection string?

  • #3
    Registered User
    Join Date
    Sep 2005
    Location
    austin
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Code:
    <%
    
    	Set objConn = Server.CreateObject("ADODB.Connection")
    	objConn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};"_
        		                 & "SERVER=localhost;"_ 
                	             & " DATABASE=database;"_
                    	         & "UID=database;PWD=hidden; OPTION=3"
    	objConn.Open
    	
    	set objRS = Server.CreateObject("ADODB.RecordSet")
    	
    %>
    This is my entire db_open.asp.

    I apologize if I seem quite ignorant when answering your questions --this website was sort of tossed at me in a chaotic hurry, and I don't know .asp very well at all.. so I'm just starting to learn.

    I appreciate *any* help that you can give me with this.


    Oh, and again, this is the code that the OLD Webmaster was using... who had a domain/etc. We're having to use a free asp host, for now, because of how quickly this all came up. I'm just making sure that none of the code needs to be changed because of those reasons.
    Last edited by vicksen; 09-14-2005 at 07:23 PM.

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Okay, so obviously there is a database component to this site. Has that database been loaded on your new host? If it has, they might not be using MySQL like your old host was and that is why you are getting that error message.

    If they do have MySQL and your database has been loaded properly, they must be using a different MySQL ODBC driver then the one specified in the code.
    OracleGuy

  • #5
    Registered User
    Join Date
    Sep 2005
    Location
    austin
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    *grin* Yay! Someone who knows .asp! I've been trying to find .asp people to teach me what is wrong with this code for so long, now!

    Well, I bet that IS the problem! I'm using www.1asphost.com, now, and the site WAS hosted by the guy who wrote this code/had his own domain/ etc.

    I bet MySQL isn't supported by 1asphost.com.

    *frown*

    I'm gonna start searching for a free asp host that supports MySQL... or do you think it would be easier/ possible to change that line of code to a different driver that 1asphost supports?

    ---
    I just talked to the guy, and he said that IS the problem. So we have confirmation! And my questions remain: Should I change the code, or look for a different free asp supporting host?

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Well on their "more info" page for their free package they say "100MB MySQL Database Space" which implies they do support it. If you have talked to them and they don't support MySQL then I guess their site is wrong, if that is the case:

    Well, their site also says their free plan offers support for Access databases. So you could convert your database into an Access one and then modify the connection string to open it. However, you might (more than likely?) will run into SQL on other parts of the site since stuff that Access doesn't support was probably used (not that there is anything wrong with that).

    Your best bet to minimize any sort of work re-writing stuff would be to go to another host that supports ASP and MySQL. Then all you would have to do is put your files on there, reload your database onto the server, and connect to it (your connection details like the username and password might change but that is hardly a big deal).

    You could go with ASP and MsSQL which might still have some SQL compatibility problems but not nearly as many as Access. You'd have to change your connection driver but it isn't a big deal either.
    OracleGuy

  • #7
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @vicksen,
    I think you are going to be hard pressed to find a hosting site with free MySQL. All the hosting companies that I have seen charge for SQL or MySQL storage. If you are wanting free hosting, then more than likely you will have to convert this over to Access.

  • #8
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by neocool00
    All the hosting companies that I have seen charge for SQL or MySQL storage.
    That isn't generally true, most paid hosting plans include some sort of database other than Access.
    OracleGuy

  • #9
    Registered User
    Join Date
    Sep 2005
    Location
    austin
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, if it says they support MySQL, then maybe I'm not doing something right.

    You say I need to load the database to the server, does that entail more than just uploading it, like I uploaded the rest of my files, to the server that the rest of my site is saved on?

  • #10
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by vicksen
    You say I need to load the database to the server, does that entail more than just uploading it, like I uploaded the rest of my files, to the server that the rest of my site is saved on?
    Yes it does. Do you have the data from the database that was on your old host? I don't know how you transitioned to your old host so I'll sorta have to guess, do you have a file with a dump of the database? It might have a .sql extension. If you do, what you need to do is create a new database on your new server and execute the file. Does your host provide some sort of web interface to work with your account? If they do, is there a place in there relating to databases and/or MySQL?
    OracleGuy

  • #11
    Registered User
    Join Date
    Sep 2005
    Location
    austin
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    !!! Success.

    Yes, I have a dump and it's in .sql format.

    I looked thru 1asphost.com, and it says:

    Their server are Xeon processor servers with atleast 1 GB of RAM. These Dell servers run on Windows 2000 and IIS 5.0.

    It also says that, in order to use your database, "you must use a dsn-less connection to connect to your database. Here is sample code on how to use a dsn-less connection: set objconn = Server.CreateObject("ADODB.Connection") objconn.Open "Driver={Microsoft Access Driver (*.mdb)};" & "Dbq=" & Server.MapPath("/username/database/db.mdb")"


    And, yes, they do! http://www.1asphost.com/databases.asp

    And, in reading thru it, I'm just all the more confused. Where do I enter that code? *sigh* I'm sorry to be so much trouble! So, if you could explain to me step-by-step what I should do from here [in creating the new database and stuff], I would really appreciate it. Thank you so much for your help!
    Last edited by vicksen; 09-15-2005 at 03:10 AM.

  • #12
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @vicksen,
    Ok, on the site's FAQs (http://www.1asphost.com/faqs.asp?q=21), it states that they only support Access databases. So, you are going to have to create an Access database, import your data into it and upload it. Then you can modify your connection string (http://www.1asphost.com/faqs.asp?q=52). You may also have to modify other parts of your code that is not compatible with Access (as in you may find some sql code that is specific to MS SQL server or MySQL that will not work in Access or may need different syntax).

    @oracleguy,
    I meant that you may not be able to find a free hosting site that includes MySQL or MS SQL without an additional charge of some sort. I have seen hosting companies that offer MS SQL database plus the regular hosting abilities for less than $10/month, but I don't know how reputable they are since I have not dealt with them.

  • #13
    Registered User
    Join Date
    Sep 2005
    Location
    austin
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    neo_

    I don't have Access.. so I suppose, after talking with Oracle, I need to find some sort of free web hosting that supports ASP and MySQL.

    If anyone has any ideas, please let me know.

    And thanks for all of your help, guys!

  • #14
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hii all
    i get a problem here...
    i'm working on a scada system , & i'm using a vbscript in it .
    i built a script to collect data from some outer device called "PLC" in a data recordset
    & this massage appeared to me when i run the program "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"..
    and this is the code to make a data recordset for the tow items "volt(v) & current (i)"
    Dim objConnection
    Dim strConnectionString
    Dim strSQL
    Dim objCommand
    Dim objRecordset
    Dim v,i,t
    v=SmartTags("InstV")
    i=SmartTags("InstI")
    t=SmartTags("time")

    Set objConnection = CreateObject("ADODB.Connection")

    objConnection.ConnectionString = "Provider=MSDASQL;DSN=voltage;UID=;PWD=;"

    objConnection.Open

    Set objCommand = CreateObject("ADODB.Command")

    Set objRecordset = CreateObject("ADODB.Recordset")

    objCommand.CommandType = 1 ' 1=adCmdText

    Set objCommand.ActiveConnection = objConnection

    objCommand.CommandText = "insert into Voltage (t,v) VALUES ("&t&","&v&")"

    Set objRecordset = objCommand.Execute
    objConnection.Close

    Set objCommand = Nothing

    Set objConnection = Nothing


    Set objConnection = CreateObject("ADODB.Connection")

    objConnection.ConnectionString = "Provider=MSDASQL;DSN=currnt;UID=;PWD=;"

    objConnection.Open

    Set objCommand = CreateObject("ADODB.Command")

    Set objRecordset = CreateObject("ADODB.Recordset")
    objCommand.CommandType = 1 ' 1=adCmdText

    Set objCommand.ActiveConnection = objConnection

    objCommand.CommandText = "insert into current (t,i) VALUES ("&t&","&i&")"

    Set objRecordset = objCommand.Execute

    objConnection.Close

    Set objCommand = Nothing

    Set objConnection = Nothing


  •  

    Posting Permissions

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