Hi, i am trouble to connect with sqlserver 2005 in windows authentication mode which do not contains username and password it will give me an error like connection failed for user ''(blank) here is my connection string

string URL="jdbc:sqlserver:\\localhost:1433;dbname"

can anybody help me please

Try using forward slashes (//) instead of backward ones (\\) and pass in the integratedSecurity=true property in the connection string if you are using windows credentials. More info on official pages: http://msdn.microsoft.com/en-us/library/ms378988.aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.