I am trying to complete a seemingly simple task that has turned into a several hour adventure: Getting @@Identity from TableAdapter.Insert()
Here's my code:
protected void submitBtn_Click(object sender, EventArgs e)
{
AssetsDataSetTableAdapters.SitesTableAdapter sta = new AssetsDataSetTableAdapters.SitesTableAdapter();
int ins...
I am maintaining some queries defined in the table adapters designer in Visual Studio used in some reports in a Windows Forms application (.NET 2.0).
When I run the application and execute a particular query I get an error: Arithmetic overflow error converting expression to data type smallmoney. I was surprised, since the query should pr...
Why TableAdapter does not generate update, delete, insert code for the view ?
When I add TableAdapter from view "create method to send updates directly to the database" is disabled. Is there any way to enable it?
...
i get the error "DataSetSharedkey.sharedkeyDBDataTable can not converted to string
Dim sharedkeyFromDB As New DataSetSharedKeyTableAdapters.sharedkeyDBTableAdapter
Dim test As String = sharedkeyFromDB.GetSharedkeyByUsername(tbUserName.ToString)
my GetSharedkeyByUsername Statment look like
SELECT sharedKey FROM sharedkeyDB WH...
I'm writing a game server to which many players connect.
I load up the DB into a DataSet(strong typed).
Every time a player logs in, I add a new row to Messages table using a TableAdapter.
code
var newRow = _db.Messages.NewMessagesRow(); // _db is a strong-typed-dataset
{
newRow.Title = title;
new...
Hi guys,
i have a problem. I have database with a tableadpater. i want to get the userid with this tableadapter.
Dim dsGN As New ForumTableAdapters.Message2TableAdapter
Dim dtBetrieb As Data.DataTable = dsGN.GetUserIdFromThisMessage(ConversationID)
For Each objRow As dsGN.Message2Row In dtBetrieb.Rows
mystring = ob...
My VB WPF app is using strongly typed datasets. The connection string is set in the app.config file and is changed via the application settings designer gui. During development I connect to the test database on another server. I want a screen indicator to make it clear that the app is connected to test data.
I know I could parse the co...
Hi,
I am trying to load data from Excel file to DataGridView in my Form. First I load all data from excel sheet into dataset then put all that data in database using C# LINQ and then I just set the DataGridView.DataSource to name.BindingSource and that is it. I get all the data in DataGridView but when I try to load the data again (I ha...
Hey,
I have a .mdb file with a Customers table and an Agents table. The only thing that the Agents table does as yet is populate the Agent dropdown for each customer...
I have a DataGridView linked to the customerBindingSource. The customerBindingSource has DataMember set to Customer and DataSource set to bindingSource1. This has the D...
Hi,
I am adding the following query to a .NET dataset TableAdapter.
select * from users ORDER BY RAND()
LIMIT 0,10
But the LIMIT word is not recognized as a part of the query and I am unable to proceed further.
Is there any workaround for this issue?
...