Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Connection String Permission Problem

Status
Not open for further replies.

dataman86

Technical User
Oct 11, 2008
104
0
0
US
I have developed a SQL DataBase that holds several tables. I have a Main Table, Issue Table, Resolution Table, ResolutionTimeTable, and a Technician Table. The database will hold issues that each Technician is assigned keeping tracking of the times that the technician works on a particular issue. Anyhow I have created a Visual Basic Form which right now I am calling Form1.vb. Form1 will have a Issue Field as a Drop Down List with issues worked on. The RessolutionName field will also have a Drop Down List with Resolution Name such as "Solved by Telephone", etc. The ResolutionTime field will also be a Drop Down List holding time it took for the technician to solve a particular problem. The Tehcnician field will also be a Drop Down list of the Tehcnician name that was assigned the task to work on the problem.

I am having trouble with the connection string. I have binded all of the fields correctly. I am getting this error when I try to debug the application.


Error:

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.


I am getting the Error above and the this coding is Highlighted in YELLOW: Me.MainTableTableAdapter.Fill(Me.ABC_Call_IssueDataSet.MainTable)

Full Coding:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'ABC_Call_IssueDataSet.MainTable' table. You can move, or remove it, as needed.
Me.MainTableTableAdapter.Fill(Me.ABC_Call_IssueDataSet.MainTable)

End Sub
End Class

My connection String has a problem:


The Connection String in App.Config:

<connectionStrings>
<add name="ABC1.My.MySettings.ABC_Call_IssueConnectionString"
connectionString="Data Source=3-036698\DEV_TEST;Initial Catalog=&quot;ABC Call Issue&quot;;Integrated Security=True"
providerName="System.Data.SqlClient" />

What am I doing wrong here?

Dataman86

 
Integrated Security=True

Is your SQL Server instance set to use Windows Authentication? If not you will need to provide a username and password in the connection string.

Go here for all you'll ever want to know about connection strings:


Good luck!


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Sql Server Instance is set to Windows Authentication.


Dataman86
 
OK, then have you given your account permissions to that database and specifically to the table you are trying to retrieve data from?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top