I did that. I gave sqlinternet full rights to it all. Here is the code that
is hoses when tries to open the connection. Any Ideas as to how to make this
thing connect? Is my connection string right? In aspclassic this was so easy
to do.
Private Sub UseDataReader_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles UseDataReader.Click
ListBox1.Items.Clear()
'Dim cn As New System.Data.SqlClient.SqlConnection( _
'"Server=(10.0.0.4);DataBase=pubs;" _
'& "Integrated Security=SSPI")
Dim cn As New System.Data.SqlClient.SqlConnection("Data
Source=WEBSERVER;Initial Catalog=pubs;User
Id=sqlinternet;Password=sqlinternet;")
' Create a SqlDataReader object
Dim dr As System.Data.SqlClient.SqlDataReader
' Create a new SqlCommand object
Dim cmd As New System.Data.SqlClient.SqlCommand
' Set the Select statement in the CommandText property and
' set the Connection property to the "cn" SqlConnection object
' you just created
With cmd
.CommandText = "Select au_lname, au_fname from Authors"
.Connection = cn
End With
' Open the Connection
cn.Open()
' Call the ExecuteReader method of the Command object
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
' Use this for concatenating the data from the database
Dim strName As String
' Call the Read method of the DataReader to loop thru the records
While dr.Read
' Add the items to the ListBox1 control
strName = dr("au_lname") & ", " & dr("au_fname")
ListBox1.Items.Add(strName)
End While
End Sub
----- Original Message -----
From: "Maya Tulchinsky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 06, 2004 4:15 PM
Subject: Re: [AspNetAnyQuestionIsOk] SQL Connection VS Studio .Net - HELP
>
>
> You need to setup every individual table or view to allow user to select,
> delete, etc...
> When double click on the table you will see permissions on the top right
> corner. Click on it and select appropriate rights for your user.
>
> [EMAIL PROTECTED] wrote:
> Okay I tried a new string
>
> Dim cn As New System.Data.SqlClient.SqlConnection("Data
> Source=WEBSERVER;Initial Catalog=pubs;User
> Id=sqlinternet;Password=sqlinternet;")
>
>
>
> I setup a new user from enterprise manager jsut to try it out. As far as
> table persmissions in database roles I checked them all. What else would I
> have to do in the Pubs / users area to give this new user full power so
> the
> script works.
>
>
> ----- Original Message -----
> From: "Maya Tulchinsky" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 06, 2004 3:48 PM
> Subject: Re: [AspNetAnyQuestionIsOk] SQL Connection VS Studio .Net - HELP
>
>
>>
>> Have you set up talbe permissions?
>>
>>
>> [EMAIL PROTECTED] wrote:I have a SQL server
>> 2000 running on windows 2000 server at the internal ipaddress of
>> 10.0.0.4.
>> I cannot seem to make a connection to the server. I can do fine with
>> Enterprise Manager and see all I want. Vs Stdio .net quits on the line
>> with cn.Open() as the connection string is probalby wrong. Am I doing the
>> connection string right? the Integrated Security=SSPI part is that using
>> windows authentication? If anyone has a way to make this conneciton work
>> i
>> would be very happy. So far I have wasted about 5 hours on it. Look at
>> other sites with strings but cannot seem t get it to work.
>> HELP............................
>>
>>
>> <Visual Studio.net CODE>
>>
>>
>> Dim cn As New System.Data.SqlClient.SqlConnection( _
>>
>> "Server=(10.0.0.4);DataBase=pubs;" _
>>
>> & "Integrated Security=SSPI")
>>
>>
>>
>> ' Create a SqlDataReader object
>>
>> Dim dr As System.Data.SqlClient.SqlDataReader
>>
>> ' Create a new SqlCommand object
>>
>> Dim cmd As New System.Data.SqlClient.SqlCommand
>>
>> ' Set the Select statement in the CommandText property and
>>
>> ' set the Connection property to the "cn" SqlConnection object
>>
>> ' you just created
>>
>> With cmd
>>
>> .CommandText = "Select au_lname, au_fname from Authors"
>>
>> .Connection = cn
>>
>> End With
>>
>> ' Open the Connection
>>
>> cn.Open()
>>
>>
>> </End Visual Studio .Net CODE>
>>
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>> Yahoo! Groups SponsorADVERTISEMENT
>>
>>
>> ---------------------------------
>> Yahoo! Groups Links
>>
>> To visit your group on the web, go to:
>> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>>
>> To unsubscribe from this group, send an email to:
>> [EMAIL PROTECTED]
>>
>> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>
>>
>>
>>
>> ---------------------------------
>> Do you Yahoo!?
>> vote.yahoo.com - Register online to vote today!
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
> Yahoo! Groups SponsorADVERTISEMENT
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/