Forum Moderators: open
I am an intermediate programmer who creates websites in ASP classic and use Access for my simple databases.
I have downloaded SQL Server 2005 express and have created the exact same database I had in access in SLQ Express, or I believe I have but can't connect to it to find out.
I wanted to switch to SQL express cause it is free and allows more concurrent users to hit the database (I think anyways).
So here are my questions after doing research and trial and error programming.
1. How do I connect to my database with classic asp?
********************************************
Dim connection
'Create connection object
Set connection = CreateObject("ADODB.Connection")
connection.ConnectionString = "Provider=SQLNCLI;Server=GCOLLINS01\SQLEXPRESS;Database=csAddition;Uid=user;Pwd=pass;"
connection.Open()
********************************************
When I do this I get the error:
"The user is not associated with a trusted SQL Server connection."
I am just running this locally on my xp pro machine for testing. I have read that I need to be in mixed mode authentication and I have done that. And I am assuming but probably wrong that my username and password are what I am using to log onto my machine.
2. I want to distribute this web app to people so they can run it on there local networks as well, so:
A. How does this change my connection string, if it does need username and password how would I know that when someone else installs this on there server?
B. How do I distribute SQL Express with my app?
With Access I would create the database and put it with my app (usually in the database folder) and I was done.
Having a hard time getting my head around this as you can see so I'm sure I will have more questions as responses come in.
Thanks in advance.
[edited by: jatar_k at 8:41 pm (utc) on Sep. 13, 2007]
[edit reason] obfuscated user/pass [/edit]
Try:"server=GCOLLINS01\SQLEXPRESS;user id=user; password=pass; database=csAddition;"
or:"server=localhost;user id=user; password=pass; database=csAddition;"
You should have to add the users with the correct permissions even if you are using Windows authentication. The account you used to install MSDE (express) will still need to be configured for access in SQL Server. Did you set up a SA account on installation? If so, use those credentials until you've ehausted the other causes.
As for distribution, you'll have to install SQL Server Express. You can't just copy over the file like in Access, but it should definitely outperform Access.
[edited by: jatar_k at 8:41 pm (utc) on Sep. 13, 2007]
[edit reason] user/pass [/edit]