MS SQL Express

Just starting out? Need help? Post your questions and find answers here.
tekyros
New User
New User
Posts: 1
Joined: Fri May 14, 2010 12:57 am

MS SQL Express

Post by tekyros »

Hi,

how can i do a query on the MS SQL Express 2005, i found some exemples here but not work, i tried the DSN-Test (http://www.purebasicpower.de/downloads/DSN-Test.zip) but it return this:
MakeConnection ok
DeleteConnection ok
someone know hot to do this?
if possible, post a example using the DSN-Test... or other...
Ty
User avatar
Haruks
User
User
Posts: 30
Joined: Wed Sep 23, 2009 1:41 am
Location: Brasil (Brazil)

Re: MS SQL Express

Post by Haruks »

Hello,

Where you doubt on the "DSN-TEST"?
when this code return only these 2 lines... your select in invalid...
You are configuring the QUERY? i belive that the query is on the line 286

It help you?
=D
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: MS SQL Express

Post by ABBKlaus »

Welcome tekyros to the forums,

well i guess you haven´t changed something in the example ?

You have to set this variables according to your SQL-Express installation :

Code: Select all

Server$="COMPUTERNAME\SQLEXPRESS" ; <- Computername + instance name
Database$="TEST" ; <- the database must exist
UID$="sa" ; Username
PWD$="test" ; Password
If you have installed SQL-Express without choosing the appropriate login type, you should install it again with login type "username and password" !
User avatar
Haruks
User
User
Posts: 30
Joined: Wed Sep 23, 2009 1:41 am
Location: Brasil (Brazil)

Re: MS SQL Express

Post by Haruks »

ABBKlaus

Can this example do a query using a Windows authentication?

Example using the OSQL.exe (utility of MS SQL)
osql -E -S .\SQLEXPRESS -d database -Q "select * from table"

-E = the user that run the app will do the query.. without enter the user and password...

Thank you!
=D
Post Reply