Please help me with this simple line of code.

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

Hello,

i am creating an ASP.net / VB web site with Dreamweaver MX 2004.

I have a form and a "Insert Record Behavior" to insert the form values in
the database.

Dreamweaver puts this code in the end of the form:
...
<input type="hidden" name="MM_insert" value="myForm"> (1)
</form>

The form is in a Multipanel. So when i first click the "Next" button the
form values are inserted in the database.
I want the form values to be inserted in the database only when the "Finish"
button is pressed.

I have the code which detects when the "Finish" button is pressed. All i
need is to know how to give the order not in (1) but inside the following
code:

Sub btnFinish_Click( s As Object, e As EventArgs )End Sub

I am on this since today morning but until know i have no idea of how to do
this. Please help me. I tryied and looked for every options.

Thank You,
Miguel
 
G

Guest

I believe what you are asking is "how do I code for inserting a record when the finish button is clicked"...is that about right?
If this is what you are asking, you have not provided enough information, such as what is the source file you are wanting to update.

You will need a Connection Object, which typically come in 3 flavors (ODBC, OLEDB, or SQL)
You will need a connection string to properly build your command object. There are places on the web which provided examples of connection strings to the 3 flavors noted above. Seach on ConnectionString or OLEDB Connections
You will need a command Object, again, these come in the same 3 flavors.
To properly build the Command ogject, you will need to Connection Object discussed above and your query - Something line "Insert into MyDatabaseName Values( MyValue1,...MyLastValue) .
Once you have all of that in-place, you will then need to open the connection.
Then you will use the "ExecuteNonQuery" method of the command object, which will invoke your query.

If you have never created a connection to your database/file or every written a query, you have a lot of studying to do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top