Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Dataset Update Query

$
0
0

Good Day to you,

I am busy with a windows application "TestDatabase". I am working with Visual Studio 2013 Express for Desktop. I am writing in VBA using NET 4.5. and SQL-Server. And i also using ADODB object command. "With cmm.....End With". Etc. Only Insert and Select works perfect. But Updating a single field of the database failed. Caused by de dataset query. So i am working with a head query in the code and a dataset query. And using a bindsource, Dataset and tableAdapter. The question i have is what do i fill in by the question mark(s), see under:

UPDATE `Dagmeting` SET `Datum` = ?, `Lucht_nr` = ?, `Minima` = ?, `Maxima` = ? WHERE (((? = 1 AND `Datum` IS NULL) OR (`Datum` = ?)) AND (`Lucht_nr` = ?) AND ((? = 1 AND `Minima` IS NULL) OR (`Minima` = ?)) AND ((? = 1 AND `Maxima` IS NULL) OR (`Maxima` = ?)))

I think that i fill in for Datum = a variable, Lucht_nr = variable, Minima = variable, Maxima = variable. But after that, i don't know.

When i writing a query by my self in the wizzard, the compiler don't accept it. And the error say "One or more values of required parentheses are missing". Also when i try to fill in something for the question marks. Or when i use the query builder by filling in 15 values on the right side. So i am thinking that there is a bug into the software. I am desparate.

I hope that you can help me.

p.s.: I am Dutch and not very well in writing English text. Sorry for writing faults. But it is a good exercise for me.

Greating, Willem.



Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>