Questions tagged [system.data.sqlclient]

34 questions
-1
votes
1 answer

I can’t connect to my database using SqlConnection

I just try to connect to my database with SqlConnection, but I saw the error... The point is I'm using System.Data.SqlClient, but it looks like it doesn't work somehow... private string ConectionString = "Data Source=.;Initial…
-1
votes
1 answer

System.Data.SqlClient.SqlException: 'Incorrect syntax near ')'.' / cmd.ExecuteNonQuery()

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If NamaBukuBox.Text = " " Or PngrngBukuBox.Text = " " Or PnrbtBukuBox.Text = " " Or JmlhBukuBox.Text = " " Then MsgBox("Isi Semua Kolom Informasi") …
-1
votes
1 answer

Trying to insert SQL row from C#, throws exception: 'System.Data.SqlClient.SqlException'

I'm very much a novice with C# to SQL interaction so apologies if the problem here is obvious or a duplicate. I'm trying to insert a new row into the table 'Clientes', the first part of this code connects to the database, then checks the table for…
lupinx2
  • 83
  • 1
  • 7
-1
votes
1 answer

SQL Server PRINT statement in stored procedure is being concatenated with RAISERROR message by System.Data.SqlClient

My fairly simple stored procedure does this on line 44: IF @a = @b RAISERROR('blah blah blah', 11, 1) RETURN The stored procedure is invoked client-side using the .NET Framework System.Data.SqlClient library: try { SqlCommand…
Tim
  • 8,669
  • 31
  • 105
  • 183
1 2
3