and this is the parameter that I am calling.For some reason this method does not work. I get an error saying that it expects a parameter @DELAY_CAUSE_1 which is not supplied. I check my procedure code and everything is matching up. Am I missing something here? Sorry that I haven't provided more into but the short question is how do I add the value of a combobox that has been selected? I just want to enter the number of the value selected into the table. But the combobox list will display the string.
I want to insert data to a table in SQL DB.I have a combo box with the values "5" and "6". When you click one or the other in the combo box i want these values to be inserted in a database( MS SQL Server 2008).I also have some textboxes which are bind correnctly and have no problem. The problem is with the bindings(i guess) of the combo box. I get sql exception.
Here is a snippet.
Private Sub BindFields() txtSurname.DataBindings.Add("Text", ObjDataView, "surname") txtName.DataBindings.Add("Text", ObjDataView, "name")
I am just beginner in ASP.NET programming, I am trying to prepare a small billing project by using ASP.NET and VB.NET. I would like to create a SQL Server 2000 table by passing table name and number of rows in textbox control.How I can achieve this?
I have a simple Windows Service that reads from an Excel spreadsheet and imports the records into a SQL Server 2000 database table. Before it loads it checks if the file has been successfully imported before (using filename) and whether any of the records in the file have been imported before (using primary key). If these checks are ok I load the records into a datatable and then update the datatable to the database.
However, I need to do this in a transaction as I want to ignore the whole file if there is an error. The file goes to a discarded folder and the user gets an email with why the import failed. (This is likely to be because the store the record is for is not yet added to the database and the referential intergrity of the db fails). If there is no transaction the records before the failure record are imported. When the file is imported again (the store has been added to store table) the file is then rejected because duplicate records are already in the db.
I have two tables that can't be changed. One contains Stock codes / country codes, the other has country code / description for each code. I have a combobox with all the country descriptions that can be added to the stock code table. my problems is i can't figure out how to get the selected Country description to get the right country code and add that too the Stock code table.
How do you manipulate a string that you have selected from a Combo Box that has been upated dynamically from an MS Access Database table?I have strings that are "1, Surname, Forename" and need to get both the number, and the surname out to put back into a different database table.
I'm trying to insert a row into a SQL Server table.
Using this... cmd.CommandText = "INSERT INTO MyTable (firstname, lastname) VALUES (@firstname, @lastname)" cmd.Parameters.AddWithValue("@firstname", "bob") cmd.Parameters.AddWithValue("@lastname", "jones") cmd.ExecuteNonQuery()
I get an error saying: ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the scalar variable "@firstname".
But if I use this... cmd.CommandText = "INSERT INTO MyTable (firstname, lastname) VALUES (?, ?)" cmd.Parameters.AddWithValue("@firstname", "bob") cmd.Parameters.AddWithValue("@lastname", "jones") cmd.ExecuteNonQuery() ...it works fine. What do I need to do to make the first example work? I don't understand what the error message is telling me. How do I declare a "scalar variable"?
I want to implement a button that sends values typed in textboxes of gui(vb.net i'm using visual basic 2008) into a sql server table called Noms.
Example:
2 textboxes id=1 nom = michael
Press button send the the 2 values into the 2 columns (id and name) of Noms table Then I enter in textbox(gui vb.net) id=2 and nom=mike So the output in my Noms table of sql server should be:
Id Nom 1 michael 2 mike
Here's the code implemented in button to send the values into the specified table:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 'Public Class account 'myconnection=conexiune 'comandasql=mycommand
I want to add or update columns using alter table if i am adding a new column i want show rror. I am using the code belowalter table Personal_Details alter columns DOB datetimef i uncheck the NULL to not NULL then it will shows column does not allow nulls; update fails;i want to insert the fields in between columns not at end.
In my SQL Server database I created a Table called "QUESTION" with the same fields. QuestionNumber is defined as integer unique key, auto increment
Now, when i make a bulk copy to insert the DataTable into the SQL Server, the database overwrites my QuestionNumber from the DataTable and generates new ones (starting from 1 increment 1).
How do i have to change my database setup, that the original QuestionNumbers are copied into the database?
I have insert a data which is in binary format into sql server database table Column type of table is Image Type. I have to read this column from a XML file,I am able to read but
I've spent a couple of hours trying to find the answer to this, and although there are tutorials all over the 'net none of them work for me (or I am too n00b to understand what they're telling me.I'm creating users in asp.net using Membership. What I want to do is add the generated UserId to a column in a custom table I've created, to link the stuff in the custom table with the user created in aspnet_Users.
How to correctly insert image data from XML file to database table using sql server CE and openxml,XML file is written by vb.net DataSet.WriteXml method?image data is stored in database table is :
0x89504E47.my XML file Content after written by WriteXml method is : <?xml version="1.0" standalone="yes"?> <Data> <Table> <image>iVBORw0KGgoAAAANSUhEUgAAAcIAAAGuCAYAAAADLg..</image> </Table> </Data>
but after inserting with openrowset and openxml using stored procedure to another database table its value changes to this :0x2F0039006A002F00340041004100510.and is not the first value and raises an error in vb.net for opening image from database.
i have a sql server 2000 database and a pocket pc running a sql server ce database now i looking for a way to sincronize both db.i have seen some tuturials but i dont have all files that referers on tuturial.for example i have seen this:
how do i program by saying if a certain item is selected in a combo box then that item will not appear in a second combo box. i have this code for now but it does not work
I have copied some code from the MS website which should run a DTS. The code runs without error and the event messages are as expected. But the DTS does not actually run. I can return information from the DTS such as the description and step name, but the exeution is not actioned.[code]...
I am beginner in Visual Basic.net Currently I have been given a project to design a database for college in which record of all the students and college staff will be stored i have the interface in vb.net but now when i want to make a connection to sql server 2000 database i am sufering from many problems.
I created one accounting & inventory package using VB6 + SQL Server 2000 + Crystal Reports. Now i want to distribute it to my client as a packaged software in CD. how i can pack all these as one.
have game server, I want to create Registration Account in Launcher Game, the Database name is "O2Jam" (without quotes) and table name is "member" (without quotes too) and I am using sa Account with password 123456 , the Table is contains following Column:
Im using windows vista home premuim, and I've install Visual studio 2008 and MS SQL 2000 in my laptop,My problem was i cannot establish data connection, an error said , LOGIN failed for REJ(SQL SERVER). Im using windows authentication in connecting my visual studio to SQL