Showing posts with label establish. Show all posts
Showing posts with label establish. Show all posts

Thursday, March 22, 2012

Connectivity between vb 6.0 and Sql server 2000 (data base is in Server)

Hai all
I am sudhir
I am facing problem to establish connection between vb 6.0 and ms sql
server 2000, ie data base is in Server. I want to make conneciton
between them.
please help me.
Advance thank you alll
' Basic ADO
Dim strConnectionString as String
Dim myConn as ADODB.Connection
Dim myRS as ADODB.Recordset
' This uses the SA username, but you can create / use another
strConnectionString = "Provider=SQLOLEDB.1;Password=MySAPassword;Dat a
Source=MyServerName;User ID=SA;Initial Catalog=MyDBName;"
Set myConn = New ADODB.Connection
myConn.Open strConnectionString
set myRS = myConn.Execute "SELECT MyCol From MyTable"
If not myRS.EOF then
myRS.MoveFirst
While Not myRS.EOF
' Read stuff out of the recordset
Msgbox mrRS!MyCol
mrRS.MoveNext
Wend
End If
Jamie Clancy
Ulysses Systems, London
"sudhir9992003@.gmail.com" wrote:

> Hai all
> I am sudhir
> I am facing problem to establish connection between vb 6.0 and ms sql
> server 2000, ie data base is in Server. I want to make conneciton
> between them.
> please help me.
> Advance thank you alll
>

Thursday, March 8, 2012

Connection to SQL Express ONLY with integrated security but WITHOUT domain

Does anybody know if it is possible to establish a connection to an sql express instance only with integrated security when this express instance is running on XP which is NOT part of a domain?

Thanks,

Klaus

If the SQL Express machine isn't connected to a domain then I don't believe Kerberos authentication will work but NTLM authentication should work. If the client application is running on the same machine as SQL Express then you should be able to straightforwardly give a user account local to the machine permission to connect to SQL Express (machine administrators will have it by default). If you're connecting from off-box then I think you'll need to setup the same account (same user name & password) on the remote machine.

Hope that helps.

Vaughn

Tuesday, February 14, 2012

connection string

I use sa account to establish connection from .NET web application with SQL
database.
Now I have to use windows authentication and any combination of windows
accounts with different rights have been failed. I'm always getting the same
error:
System.Data.SqlClient.SqlException: Login failed for user 'username'.
any ideas will be appreciated.
Thanks,Hi,
You want to use Integrated Security, right?
cnn.ConnectionString = "integrated security=SSPI;data source=" & dbServer &
";" & _
"persist security info=False;initial catalog=VPOInventory"
HTH
--
Dan Artuso, MVP
"Alan" <Alan@.discussions.microsoft.com> wrote in message news:76566908-5D49-4A5E-8F0C-343B9
1CD0FE2@.microsoft.com...
> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||Check to see if you are using mixed mode for sql server
authentication(windows/sa).That might be your problem.you might have used 's
a
authentication only'
"Alan" wrote:

> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||check to see if you are using mixed mode sql server authentication.that migh
t
be your problem.you might be using 'sa only' authentication.
"Alan" wrote:

> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||did it help?
"Alan" wrote:

> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||Hello Alan,
Also, please never use SA in your application. You should create an account
for your application to run as and only grant the necessary permissions to
that user. The same goes for Windows Authentication. Don't grant the user
you use for running your application membership into the system administrato
rs
role.
Aaron Weiker
http://aaronweiker.com/
http://sqlprogrammer.org/

> I use sa account to establish connection from .NET web application
> with SQL
> database.
> Now I have to use windows authentication and any combination of
> windows
> accounts with different rights have been failed. I'm always getting
> the same
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||Thank you,
your advise was very helpful.
"Dan Artuso" wrote:

> Hi,
> You want to use Integrated Security, right?
> cnn.ConnectionString = "integrated security=SSPI;data source=" & dbServer
& ";" & _
> "persist security info=False;initial catalog=VPOInventory"
>
> --
> HTH
> --
> Dan Artuso, MVP
>
> "Alan" <Alan@.discussions.microsoft.com> wrote in message news:76566908-5D4
9-4A5E-8F0C-343B91CD0FE2@.microsoft.com...
>
>|||Our SQL server is running in mixed mode and I want to move it to Windows onl
y
mode.
Thank you.
"Preeta" wrote:
> did it help?
> "Alan" wrote:
>|||Thank you - I'm trying to get rid of this account.
First I want to move all our SQL servers to Windows only mode.
Thank you.
"Aaron Weiker" wrote:

> Hello Alan,
> Also, please never use SA in your application. You should create an accoun
t
> for your application to run as and only grant the necessary permissions to
> that user. The same goes for Windows Authentication. Don't grant the user
> you use for running your application membership into the system administra
tors
> role.
> --
> Aaron Weiker
> http://aaronweiker.com/
> http://sqlprogrammer.org/
>
>
>