Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
ASP - spajanje na MSSQL bazu podataka

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
Codemaster



Joined: 11 Jul 2006
Posts: 189
Location: Metkovic

PostPosted: 21.08.2006 23:48    Post subject: ASP - spajanje na MSSQL bazu podataka Add user to your forum ignore list Reply with quote

Znam da treba kreirati sistemski DSN sa odabranom bazom podataka i ispravnim podacima za pristup serveru. To sam uradio. Zatim sam u .asp dokumentu napisao konekciju:

Code:
Set Cnxn = Server.CreateObject("ADODB.Connection")
strCnxn = "DSN = ComartCMS"
Cnxn.Open strCnxn



ComartCMS je naziv sistemskog DSN-a i ujedno ime baze na koju se spajam. To sam sve uradio i idem u browseru provjeriti jel sve radi, a on izbaci poruku:

Quote:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/cms/default.asp, line 4


Jel zna neko rješenje problema. Bio bih jako zahvalan.
btw. SQL server je lokalni (SQLServer Express 2005), a stranica u kojoj je konekcija je podešena u IIS-u

_________________
Let's play!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Moebius



Joined: 26 Jan 2004
Posts: 245
Location: zagreb

PostPosted: 22.08.2006 03:01    Post subject: Add user to your forum ignore list Reply with quote

Probaj zaobici DSN i pokusaj preko OLEDB konekcije koja usput i brze radi:


Set Cnxn = Server.CreateObject("ADODB.Connection")
Cnxn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = ComartCMS; User Id = TvojUsername; Password=TvojPassword"


local zamjeni sa IP adresom ili punim nazivom stroja na kojem se vrti SQL.
Back to top
View user's profile Send private message Visit poster's website
Codemaster



Joined: 11 Jul 2006
Posts: 189
Location: Metkovic

PostPosted: 22.08.2006 08:58    Post subject: Add user to your forum ignore list Reply with quote

Evo radi sve.

Puno hvala.

_________________
Let's play!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group