can anyone show me a sample visual basic 6.0 code that uses AddNew method of recordset?
598048
try this,\n\nWith rsObject\n   .AddNew\n   .Fields("One").Value = cboF1.Text\n   .Fields("Two").Value = lstF2.List(lstF2.ListIndex)\n   .Update\nEnd With
299182
vc++ is much more tougher to handle than it's compatriot : visual basic. As the saying goes: "vb is fun, vc++ is shit hard work!!".\n\nok..\ni'll give u da steps to create 2 edit boxes and to get the sum : )\n\nhere we go:\n\n1) open ms vc++\n2) go to file ->new and under the projects tab, select mfcappwizard (exe) , enter name and choose location to save project\n3) now, the wizard pops up.\nStep 1 : select dialog based  (since the addition thing is fairly simple, we'll go for this)\n4) press next for step 2 and once again for step 3 (which means u r accepting the default values in those steps).\n\nFinally, u get a dialog showing the summary of the application.\n\nif u have come till here..gooood!! u have created a "skeletal application" .. and this, buddy , is the true essence of MFC programming.\n\nok.. now that u have created the skeleton application , its time i teach u how to put two text boxes and if ya click a button, the sum would be displayed in another :::\n\n\n\n\n* now, on ur left, u should see a "workspace" window. its one containing a list of files in your application.\n\n* in that, select the resources tab (tab is found at bottom of workspace window)\n\n* open the tree listing. in that u would find a "dialog" sub tree\n\n* open that. and u would find a "IDD_..." thing . double click on that, and presto, u would get a blank dialog.\n\n* now, that blank dialog would be accompanied by a toolbox if u dont see the toolbox, right click on the toolbar on top of vc++ window, choose toolbox.\n\n* if u see the toolbox, good. now, choose the edit box (text box) and draw three text boxes on the dialog. now, choose the button and draw one button on the dialog.\n\n* the text boxes would have the name IDC_EDIT1 , IDC_EDIT2 and IDC_EDIT3 and button would be IDC_BUTTON1(u can see the names by right-clickin on the component and choosing properties.)\n\n* ok, now , go to view- > class wizard (a very very very important tool in vc++)\n\n* move to "member variables" tab. u can see the components that u have added.( if u have not, just try flickering with the drop down dialogs that u see there). \n\n* now, double click on IDC_EDIT1 and another small window appears , asking u the variable name it would ve already displayed "m_" DONOT remove the "m_" jus add something to it like : "m_number1" . repeat same for the other two edit boxes and make sure u remember the variable names.\n\n* u have come till here?? awesome!! ; )\n\n* now close the class wizard window.\n* double click on tha button and.. u get a prompt something like onbuttonclick (somethin like dat) ..whatever comes, press ok. and presto, u go into the coding wonderland.\n\n* remember the varible names ?? goood. and u kno how to put an addition statement?? awesome!! . jus do that.. eg: m_number3=m_number1+m_number2;\n\n*CAUTION : while giving variable names , make sure u <<CHOOSE THE int TYPE>>\n\n* phew.. take a break and come back cos u r gonna watch ur creation come to life ; )\n\n*goto project->build xyz.exe\n\n* wait till it completes compilation and shows the sweet words "0 errors 0 warnings" on the bottom window of the screen (watch window).\n\n* press ctrl+f5 and voila.. u get ur own summing application created using MFC and with help of appwizard,classwizard and moi, ANAND ; )\n\n\n\n\nIF u have encountered any problem anywhere enroute to success, worry - not. Send me a message Y! id: anand_87123\ny! mail : anand_87123@yahoo.com\nput the subject line as vc++ - Y! answer\n\nok??\n\nP.S : if ya feel i have helped ya, i dont mind my answer being voted as the best answer by u!!\n\nand also, i can prescribe 2 books for ya :\n1) MFC programming by JEFF PROSISE and \n2) David J Kruglinski, Scott Wingo :: "Programming Microsoft Vc++ Fifth edition"\n\nthey are available for download from da net (illegal ofcourse ... ; ) ) try searching
94546
You may need to know VBA (Visual BASIC for Applications) in order to do this.  If you want to change the data of one field based on the input into another field, put the code into the field_AfterUpdate() event procedure of the field that will be manually updated.
1052780
In the LSMW section of the help you will find information related to ABAP with Batch input.\n\nhttp://help.sap.com/saphelp_nw04/helpdata/en/87/5d52c7458d11d3bc4d00105a6588b2/frameset.htm
347994
dim cn as adodb.connection\ncn.open "..."\n\ncn.execute "update tablename set update='" & now & "' where id='xxx' "\n\ncn.close
150672
Two ways to do it.\n\n1) SQL - in the SQL statement in the OpenRecordSet statement, add a WHERE clause the searches only for records you are looking for.\n\n2) Loop through the returned recordset until you find the record you are looking for.\n\nSub OpenRecordsetX()\n\n   Dim wrkJet As Workspace\n   Dim wrkODBC As Workspace\n   Dim dbsNorthwind As Database\n   Dim conPubs As Connection\n   Dim rstTemp As Recordset\n   Dim rstTemp2 As Recordset\n\n   ' Open Microsoft Jet and ODBCDirect workspaces, Microsoft \n   ' Jet database, and ODBCDirect connection.\n   Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)\n   Set wrkODBC = CreateWorkspace("", "admin", "", dbUseODBC)\n   Set dbsNorthwind = wrkJet.OpenDatabase("Northwind.mdb")\n   Set conPubs = wrkODBC.OpenConnection("", , , _\n      "ODBC;DATABASE=pubs;UID=sa;PWD=;DSN=Publishers")\n\n   ' Open five different Recordset objects and display the \n   ' contents of each.\n\n   Debug.Print "Opening forward-only-type recordset " & _\n      "where the source is a QueryDef object..."\n   Set rstTemp = dbsNorthwind.OpenRecordset( _\n      "Ten Most Expensive Products", dbOpenForwardOnly)\n   OpenRecordsetOutput rstTemp\n\n   Debug.Print "Opening read-only dynaset-type " & _\n      "recordset where the source is an SQL statement..."\n   Set rstTemp = dbsNorthwind.OpenRecordset( _\n      "SELECT * FROM Employees", dbOpenDynaset, dbReadOnly)\n   OpenRecordsetOutput rstTemp\n\n   ' Use the Filter property to retrieve only certain \n   ' records with the next OpenRecordset call.\n   Debug.Print "Opening recordset from existing " & _\n      "Recordset object to filter records..."\n   rstTemp.Filter = "LastName >= 'M'"\n   Set rstTemp2 = rstTemp.OpenRecordset()\n   OpenRecordsetOutput rstTemp2\n\n   Debug.Print "Opening dynamic-type recordset from " & _\n      "an ODBC connection..."\n   Set rstTemp = conPubs.OpenRecordset( _\n      "SELECT * FROM stores", dbOpenDynamic)\n   OpenRecordsetOutput rstTemp\n\n   ' Use the StillExecuting property to determine when the \n   ' Recordset is ready for manipulation.\n   Debug.Print "Opening snapshot-type recordset based " & _\n      "on asynchronous query to ODBC connection..."\n   Set rstTemp = conPubs.OpenRecordset("publishers", _\n      dbOpenSnapshot, dbRunAsync)\n   Do While rstTemp.StillExecuting\n      Debug.Print "  [still executing...]"\n   Loop\n   OpenRecordsetOutput rstTemp\n\n   rstTemp.Close\n   dbsNorthwind.Close\n   conPubs.Close\n   wrkJet.Close\n   wrkODBC.Close\n\nEnd Sub\n\nSub OpenRecordsetOutput(rstOutput As Recordset)\n\n   ' Enumerate the specified Recordset object.\n   With rstOutput\n      Do While Not .EOF\n         Debug.Print , .Fields(0), .Fields(1)\n         .MoveNext\n      Loop\n   End With\n\nEnd Sub
678911
Check out the site at http://www.pscode.com - I don't do C++ but I use that site all the time for Visual BASIC stuff I work on.
300205
As the Definition says it is a SUBROUTINE (or a procedure) that is executed when the VB Form is Loaded........\n\n\nIn practice all the database connections and the Global Variables are defined in this Sub becuase this is where the processor do bulk of the processing of your application i.e. at the start.\n\nIt is used like\nPrivate Sub Form_Load ()\ndim DBConnection\ndim name AS String\n.\n.\n.\n.\n'Other executions\nEnd Sub
495673
sure u have \nand try crystal reports\n\ni dont have to tell u the steps .. cause i dont remember really .. but try with msdn
1082818
Please note for any of this to work you have to have the project references include the Microsoft ActiveX Data Objects library\n\ndim conn as new ADODB.Connection\ndim rs as new ADODB.Recordset\n\n'Tell your connection what and how to connect\nconn.ConnectionString= "DSN=DSNname;UID=SqlServerUserID;pwd=SqlServerPassword"\n\n'open the connection\nconn.open\n\n'Run your SQL Query\nset rs = conn.Execute("Select * from datatable")\n\n'See if any records were returned we do this\n'by seeing if the recordset is simoultaneously reporting\n'that it is at the beginning and end of the record set\nif not rs.EOF and not rs.BOF then\n\n\n     'Get the field by field name\n      myValue=rs("fieldName")\n\n     'Get the field by position in the return set\n     'This is a zero baed index\n      mySecondValue= rs(3)\n\n     'Now I move to the next record. \n     rs.MoveNext\n\n     if not rs.EOF then\n          'Get another value\n           myValue=rs("FieldName")\n     end if\n\nend if\n\n'now close and clean up\n\nconn.Close\nset rs = nothing\nset conn=nothing
589382
Your problem here is that your records are empty. You should be something like this:\n\ndata1.recordset.movefirst\ndo while not data1.recordset.eof\n  code to do whatever on the data in the recordset\n  data1.recordset.movenext\nloop\n\nor if you are trying to evaluate only one record:\n\nIf data1.recordset.eof = false then\n  code to do whatever on the data in the recordset\nElse\n  code to do whatever if the recordset doesn't exist\nEnd If
123651
You can do it in Visual Basic by defining a subroutine that will be called just before the document is printed:\n\nPublic WithEvents appWord As Word.Application\n\nPrivate Sub appWord_DocumentBeforePrint _\n        (ByVal Doc As Document, _\n        Cancel As Boolean)\n\nDim s As Shape\n\nFor Each s In Doc.Shapes\nIf s.Type = msoTextBox Then\n    s.Line.Visible = msoFalse\n    End If\nNext s\n\nEnd Sub\n\nThe problem is, it's a little bit tricky getting this routine hooked into the application event handler.  Translation:  I didn't get it to work.  Look at the documentation for the DocumentBeforePrint event for details on what to do.
134967
Yes, by using the BB code phrase manager. or just go to Vbulletin.org for more info.
204091
you can get a free version of visual basic here\n\nhttp://msdn.microsoft.com/vstudio/express/default.aspx
438038
i would have a look at this site\n\nhttp://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=5120&lngWId=2
918547
insert into Signup(Added)\nValues (getdate())\n\ngives the time and date the record was saved
209872
I already answered this for you in your other thread, using Visual Basic. With a little effort, you ought to be able to convert one type of Basic to another. The languages are virtually identical.\n\nOnce again, what you need to do is create a function. Let's call it DozenBetType. It is going to take one argument: an integer: DozenBetType(someInteger)\n\nThe function is going to return:\n1 if the number passed to it is 1-12\n2 if the number is 13-24\n3 if the number is 25-36\n\nThen you can simply call the function on both the number guessed and the number your program has generated.\n\nFor example, if the number your program generated is declared as intResult, and the number the person guessed is declared as intGuess:\n\nif DozenBetType(intGuess) = DozenBetType(intResult) then they have won the bet, otherwise they have not. (A simple if-then-else statement\n\nIf you don't want to use a function, or if that's too complicated for you, you can declare two new variables: intDozenTypeResult, for the number your program generated and intDozenTypeGuess, for the number your user guessed.\n\nSet intDozenTypeResult to be 1 if the program's random number is between 1-12, set it to be 2 if the value is 13-24, set it to be 3 if the value is 25-36. \n\nDo the same thing for intDozenTypeGuess.\n\nThen, simply compare those two variables:\n\nIf intDozenTypeResult = intDozenTypeGuess then they have won, otherwise they have not (again, a simple if-then-else statement).\n\nPlease, don't create new threads for the same question. Just update your old question.