ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to connect to MSSQL with asp
Posted by Tim on Apr-05-2012 21:12
So I don't understand how to do the connect part of this. Im trying to connect to our MSSQL DB that is called TimTest. I don't think there is any log in credentials. If someone could show me how or explain it that would be great. Ohh yea I also tried to copy the info from the demos but I got this error

ADODB.Recordset error '800a0e7a'

Provider cannot be found. It may not be properly installed.

/ChartDir/Chart1.asp, line 21

So any advice would be greatly appreciated! :)

Thanks

  Re: How to connect to MSSQL with asp
Posted by Peter Kwan on Apr-06-2012 01:15
Hi Tim,

The error means that your connect string specifies a certain database driver (technically called the database provider), but the driver is not installed in your computer.

The exact connect string depends on your database brand and version. For some databases, there can be multiple drivers available. You would need to use a driver that exists in your computer.

The code in the demo program uses the Jet Database Driver, which comes with 32-bit Windows (and so should be available in all 32-bit Windows). It is for the MS Access database that comes with the demo. If you are using the MS SQL database, that driver is not applicable to you,

You may want to check the followings for some examples for the connect strings for MS SQL.

http://msdn.microsoft.com/en-us/library/ms130978.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms711587(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/ff821690.aspx

One way to generate and test connecting strings is to create an empty aaa.udl file on your desktop. Then double click on that file. It should pop up a form. Go to the "Provider tab" to choose the provider, go to the Connection tab and fill in the server name and database name and other fields. Now you can press "Test Connection" to test if your configuration is correct. If it works, you can click OK. Then you may open the file using Notepad to see the connection string.

Hope this can help.

Regards
Peter Kwan