qq qq

qq qq

  • NA
  • 6
  • 0

Incorrect syntax near ')' Error

Apr 14 2010 4:51 AM
Hi. I have the following code:

m_conSqlConnection.ConnectionString = "Data Source=...;Uid=...;Pwd=...;Initial catalog=...;"
m_conSqlConnection.Open()
m_cmdSqlCommand = New SqlCommand("insert into Building(internalCodeBuilding, inUseNotBuilding) values('dsa','ds'))", m_conSqlConnection)
m_drDataReader = m_cmdSqlCommand.ExecuteReader

All I am trying to do is to insert a record into a Sql database using Visual Studio for Applications (from InfoPath) using C#. I have tried to do this in several ways, but every time I get this error:
Incorrect syntax near ')'
I have no ideea why. Can somebody help me please? Thank you so much!
P.S. I am new with C#.

Answers (2)