I have a c# winform application which connects to a database and read data. This database is used by another app also. I just executed a query from my app to read some data. I don’t have the user …
Tag: sqlcommand
SQL Query String Works in SQL Server Management Studio, But Not in VB.net with SQLCommand.ExecuteReader
I have an ASPX page using VB.net code, and it is set up to run a series of SQL queries and populate a SQLDataReader with the results. Each SQL query is pulled from a specific field in a table within the SQL database. This code works perfectly for literally every query I run through it, except one. The VB code
C# BulkCopy.WriteToServer Changing Values
I have a datatable that is created from and excel sheet. I am trying to SqlBulkCopy.WriteToServer. When I do so it converts my “Percent” value to 0 when my tables schema has type Decimal(38,0) for the “Percent” column. However, it inserts correctly when I have the Data Type as Float. I am not sure what is going on. I would
Compare two tables for a matching value from the respective columns and identify records missing
I have two tables and data like below: I want to compare two table’s columns “Type and MatchType” and identify the Ids of first table where Type is missing in MatchType. “Type” and “MatchType” are …
How to select a photo from the photo table for each post by query in MySQL
I have two table I want to show one photo for every post but when the run query show post for every photo Photo table : +————————————————————+ | photo_id …
SqlCommand only returns one row
Trying to only return the first few number of rows because my database was too big, however when I was testing my SQL, I did a select * and was only returned the first row. What is wrong with my solution? Answer In your loop you constantly re-create the instance of the variable logs thus overwriting the previous one and