| | |
a blank form to insert data????
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2007
Posts: 3
Reputation:
Solved Threads: 0
hi every1..
i have a form with a register butoon...when the button is pressed, the registration form (which is connected to ms access) opens...but the problem is that the form displays the data stored in table..although i need a blank form, which allows users to insert data...
any emergency reply appritiated...
tnx in advance
i have a form with a register butoon...when the button is pressed, the registration form (which is connected to ms access) opens...but the problem is that the form displays the data stored in table..although i need a blank form, which allows users to insert data...
any emergency reply appritiated...
tnx in advance
If there are any textboxes in the form (which I'm sure there are), don't connect them to the database. Then if there is a button that adds the data into the database, then get the data from the textboxes then add them to the database.
There are 10 types of people: those who understand Binary and those who don't!
•
•
Join Date: May 2007
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
If there are any textboxes in the form (which I'm sure there are), don't connect them to the database. Then if there is a button that adds the data into the database, then get the data from the textboxes then add them to the database.
help me plz...tnx
•
•
•
•
hello..for the process that u mentioned, i have 2 open a connection in click event of that button and assign every text box to database with a recordset...right???...but how can i do that??//...bcz i'm really new to VB and i gotstuck...![]()
help me plz...tnx
Dim rstRecordSet As RecordSet
'Connection Info Here' Make sure you open the database to "Write"
With rstRecordSet
.AddNew
.Fields(0) = Text1.Text
.Fields(1) = Text2.Text
.Fields(2) = Text3.Text
.Fields(3) = Text3.Text
.Update
End With
^^ That should be your answer? not sure if thats what you wanted but let me know
Dim conConnection As New ADODB.Connection Dim cmdCommand As New ADODB.Command Dim rstRecordSet As New ADODB.Recordset 'Defines the connection string for the Connection. Here we have used fields 'Provider, Data Source and Mode to assign values to the properties ' conConnection.Provider and conConnection.Mode conConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ App.Path & "\" & "database.mdb;Mode=Read|Write" 'Define the location of the cursor engine, in this case we are opening an Access database 'and adUseClient is our only choice. conConnection.CursorLocation = adUseClient 'Opens our connection using the password "Admin" to access the database. If there was no password 'protection on the database this field could be left out. conConnection.Open
(o(o.(o.O).O)O) - Shhhhh They're Watchin Us!!!
![]() |
Similar Threads
- How to insert data into a db (Java)
- Insert Data in to Db from the Dynamic Rows (HTML and CSS)
- Posting form data to an Oracle database (JavaScript / DHTML / AJAX)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Can someone please help with this?
- Next Thread: Out of Memory Exception
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





