2
Answers

Incorrect syntax near ')' Error

qq qq

qq qq

14y
4.8k
1
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)