Sunday, 25 March 2012
connect to server name 2005!
What is the default server name' I can not see anything in managment
studio.
whenever i tried to connect OR create database through SQL sever
Management studio, it asked me:
server type: (here i select Database Engine)
server Name : ( '')
Authentication : which one I have to use? (Windows Authentiction is by
default, another is SQL server Authentication,)...
I don't know what to do with server name . Please advise.Hi,
please do not mulitpost, answered in public.sqlserver
HTH, jens Suessmeyer.
http://www.sqlserver2005.de
--
connect to server name 2005!
What is the default server name' I can not see anything in managment
studio.
whenever i tried to connect OR create database through SQL sever
Management studio, it asked me:
server type: (here i select Database Engine)
server Name : ( '')
Authentication : which one I have to use? (Windows Authentiction is by
default, another is SQL server Authentication,)...
I don't know what to do with server name . Please advise.Hi,
please do not mulitpost, answered in public.sqlserver
HTH, jens Suessmeyer.
--
http://www.sqlserver2005.de
--sqlsql
Thursday, 8 March 2012
Conn Obj
Hi All -
Prior to ASP .Net I use to create a connection object for SQL Server in my global.asa file and I would reference the obj whenever needed. how can I do the same in asp .net.
Here is my old asp sample:
Global.asa file:
Sub Session_OnStart
set session("conn") = createobject("adodb.connection")
session("conn").Open "PROVIDER=MSDASQL;DRIVER={SQL Server};SERVER=xxx.xxx.xxx.xxx;DATABASE=xxxxx_db;UID=xx;PWD=xxxxxxxx;"
End Sub
Call from Other Pages:
sqlstr = "select * from members WHERE memberid = '" & session("mbr_memberno") & "'"
set objRS = session("conn").Execute(sqlstr)
... How can I do this in .net?
rich
You can do a similar thing in ASP.NET using the global.asax file.Though, I would caution against it: check out this article for somereasons why you want to avoid this:
http://www.codeproject.com/asp/dbobjects.asp
Jason
|||
So is it better to just set session variables for servername, uid and pass so if it changes its in one file rather than shifting through tons of code replacing sql server names. Also if I do create a session var of these items can I call them in the vb.net portion of the code?
rich
|||web.config is the place to do it...there's an article on my blog on how to do it..check it out.|||The proper way to do it is to store the connection string itself in theweb.config (as the previous post suggests -- though others say thatstoring usernames and passwords in an unecrypted format is a bad idea-- trusted connections are better they say) and instantiate theconnection object and close the connection object on each page.Jason
|||
You can encrypt the connection string and put it in the web config. There's a good example of doing so here:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT08.asp
Sunday, 19 February 2012
Confirm password problem??
anything on the properties of any of the logins, it asks me to confirm the
password even though it has not been changed. Actually, I can just view the
properties of any login, change nothing, click OK, and it will still ask me
to confirm the password. If I type in the password (and the password has
not been changed) it says it is incorrect. I must retype the password,
click OK, verify it, and then click OK again. What is the problem here?Sounds like this may be the issue you are running into:
FIX: You Are Prompted for Password Confirmation After You
Change a Standard SQL Server Login
http://support.microsoft.com/?kbid=826161
-Sue
On Thu, 8 Apr 2004 07:14:43 -0500, "Dave"
<DMikeK@.hotmail.com> wrote:
>I am running SQL Server 2000 on a Windows 2000 Server. Whenever I change
>anything on the properties of any of the logins, it asks me to confirm the
>password even though it has not been changed. Actually, I can just view th
e
>properties of any login, change nothing, click OK, and it will still ask me
>to confirm the password. If I type in the password (and the password has
>not been changed) it says it is incorrect. I must retype the password,
>click OK, verify it, and then click OK again. What is the problem here?
>|||Sue,
Thanks. I did try searching the Knowledge Base but didn't find that one,
for some reason. I'll give it a try.
Dave
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:6vja70leoufd0535ral22cb1q7f4hnatq0@.
4ax.com...
> Sounds like this may be the issue you are running into:
> FIX: You Are Prompted for Password Confirmation After You
> Change a Standard SQL Server Login
> http://support.microsoft.com/?kbid=826161
> -Sue
> On Thu, 8 Apr 2004 07:14:43 -0500, "Dave"
> <DMikeK@.hotmail.com> wrote:
>
the
the
me
>