• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Connecting to virtual SQL-server in an ASP-application...

Hi guys!
I have huge troubles setting up a connection to a virtual SQL-database. I run the virtual SQL-database on XAMPP and configure the database via phpMyAdmin. I did create a user for the database and a password.
I program the web-application in Dreamweaver CS3 with the language ASP. I'm forced to use ASP because of the server it must be uploaded to, when I'm done. I tried a connectionstring as you can see below, but it won't work. I have no problems connecting to an Access database in Dreamweaver CS3... and I can also make it wirk fine with SQL and php-pages... but ASP seems more tricky. Please heeeeeeeelp me???? :-)
Friendly regards
Ullenulle
"Driver={SQL Server};Server=localhost;Database=databasename;user=username;pwd=password"
 
I tell it to use the driver on this machine. The other choise is to use the one on the testing server.

Open in new window

0
ullenulle
Asked:
ullenulle
  • 5
  • 4
1 Solution
 
daveamourCommented:
So your asp code is running on the SQL Server too?
0
 
ullenulleAuthor Commented:
No no... the web-application will have to run on a web-server... but right now I need to make it work on my computer to test it all.
0
 
daveamourCommented:
Try changing user to uid
Also localhost needs to point to the database server of course - you know that localhost refers to the machine the code is running on right?
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
ullenulleAuthor Commented:
Hi again.
I'll try "uid". About "localhost", then I am going to use a virtual SQL-server on my computer. Isn't "localhost" the correct thing to write there?? Later on it must be transferred to a "real" SQL-server. I have a DNS for that... Do you know where I must enter the DNS in the string???
Friendly regards
Ullenulle
0
 
daveamourCommented:
Hmm not sure about the virtual SQL Server -  what virtualisation software are you using?
Is this a virtual instance of an operating system with sql server running on it?  If so then localhost won't work.
The DNS name will go where localhost goes eg:
Driver={SQL Server};Server=localhost;Database=dbname;uid=uid;pwd=pwd
Driver={SQL Server};Server=MySQLServer;Database=dbname;uid=uid;pwd=pwd

Driver={SQL Server};Server=192.168.1.185;Database=dbname;uid=uid;pwd=pwd
etc

 
0
 
ullenulleAuthor Commented:
Hi again.
I use the virtual SQL-server software called "XAMPP". It's running on my laptop and it works fine when I create PHP-pages in Dreamweaver CS3. But now when I have to make ASP-pages and test the connection in Dreamweaver, it doesn't work. I get errors that it can't find the database.... It's driving me nuts! Ooops... I just fooled around with the string again, and it seems that the problem was the driver I wrote in the string. It's not "SQL Server". It works with "mySQL ODBC 5.1 Driver". :-)
Thanks so far for your efford!
Friendly regards
Ullenulle
0
 
ullenulleAuthor Commented:
Oh... btw... It works with "uid" as well as with "user". :o)
0
 
daveamourCommented:
Ok nice one, gald to help where I can.
0
 
ullenulleAuthor Commented:
Ooops... sorry, guys. I wasn't online for a while. I'll close it now.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now