I am wrking on a VB6 project,and I m new to this,I need to save the inputs values from the text boxes from the VB form,and using the command button,i need to save the data into the access database which i had created named Dtldb.mdb
How do I use Data control for this?????
How do I do this,plz help me,I jst don't know how to do this:S

better use ADODB library for the purpose. try the sample code below

con.begintrans        'con-----adodb connection object
con.execute "your sql insert statment here"
con.committrans

Vil ths work?????

'Dim dynData As Recordset
'Dim strsql As String


'strsql =" insert into Details values('"& intPsno"',"& strName","& strNtrExp",'"& intAdv"','"& intAccno"')"
'Set dynData = Wipdb.OpenRecordset(strsql, dbOpenDynaset, dbConsistent, dbOptimistic)
'
''Start db transaction
' BeginTrans
'
'On Error GoTo RollbackDetailUp
'ErrorinTrans = False
'dynData.LockEdits = False
'


''Commit DB Transaction
' CommitTrans

and how vil i save the value from the frame control to the database,ie. i added 2 radio btn,n need to update d database according to d selection.Hw cn i achieve ths????

try the following

dim con as new adodb.connection

con.open "your connection string here"

add my previous code after this line

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.