FixYa.com
Technical Support, Instructions & Repair Service


Tags:

Microsoft Windows XP Professional

Am not able to add/ retrive data

posted by annu22 on Jul 20, 2008


am making project on school bus managment system but am not able to access data frm the table or insert in to table
am using following code kindly guide me if thr is any error in code

If cnn.State = adStateOpen Then cnn.Close
cnn.Open
Set rst = New ADODB.Recordset
rst.Open "studrec", cnn, adOpenDynamic, adLockOptimistic, adCmdTable
With rst
.AddNew("Name") = TXTNAME.Text
.AddNew("fname") = TXTFNAME.Text
.AddNew("area") = TXTAREA.Text
.AddNew("class") = txtclass.Text
.AddNew("root") = txtrootno.Text
.AddNew("bus") = txtbusno.Text
End With
rst.Close
cnn.Close

This Problem has been added to the Share Your Expertise Page under "My Work Queue".
Best Solution
posted on Jul 21, 2008
Helpful (85)

kim_cu


Rank:Wiz Wiz
Rating: 79%, 31 votes
Proper syntax is:
With rstTemp
.AddNew
!FirstName = strFirst
!LastName = strLast
.Update
End With

Do you have the ADODB library loaded?

While in "Code" view...menu/tools/references ... look for a check by "Microsoft ActiveX Data Objects x.xx..."

If you don't have ADO reference library then setting ADODB recordset won't work no matter what syntax you use.

Hint: try using Ctrl+J while you code. The library will show you available syntax as you type.
Rating Locked! (?) annu22 has rated this solution as Helpful

Can you Help with these Operating Systems problems?

Operating Systems
battery
hi i have a laptop with windows... Answer This...
Microsoft Windows XP Professional
Set up a DNS (domain name...
Can anyone reccomend a free DNS... Answer This...
Microsoft Windows XP Professional
Microsofts Window Media Player
How do change Media player to... Answer This...
Microsoft Windows XP Professional
desktop software
want 2 download desktp software... Answer This...
Microsoft Windows XP Professional
windows media Player for CE...
there are Some Media Player... Answer This...
Repair Service
Find Operating System Repairman Near You:

FixYa does not evaluate or guarantee the accuracy of any information provided through its proposed solutions, posts, or Expert Assistance Sessions. By entering this site you declare you read and agreed to its Terms. You may NOT copy or distribute the content that appears on this site without written permission from FixYa Inc.
© 2005-2008, FixYa, Inc. or its affiliates
When the original poster rates a solution that was given to his own problem, that rating is locked!
X

Are you sure the solution content is Inappropriate?
   
Tech buddies can communicate directly to answer questions. Become a Tech Buddy and have direct access to your favorite expert for FREE!