Mysql Error 40002
3 Replies - 7737 Views - Last Post: 17 August 2012 - 08:09 AM Rate Topic: #1 TFPTECH New D.I.C Head Reputation: 0 Posts: 6 Joined: 15-August 12 Run-time error'40002' Posted 16 August 2012 - 09:04 AM 'THE 3 LINES OF BELOW SHOW THE KIND OF MESSAGE I AM GETTING WHEN I TRY TO SEND DATA TO THE DATABASE ' I HAVE LEBELED THE 1, 2, 3 '1. Run-time error'40002' '2. s1000: [MySQL][ODBC 3.51 Driver][mysqld-5.5.24]Incorect '3. value: 'Text2' for age at row 1 Option Explicit Dim cnMySql As New rdoConnection Dim rdoQry As New rdoQuery Dim rdoRS As rdoResultset Dim Text2 As String Dim age As Integer Private Sub Form_Load() cnMySql.CursorDriver = rdUseOdbc cnMySql.Connect = "uid=root;pwd=moses12;server=localhost;driver={MySQL ODBC 3.51 Driver};database=SRMS;dsn=SRMS;" End Sub Private Sub cmdSave_Click() Text2 = age If age >= 6 Then 'Text4(1).Text = Text4(1).Text + 1 cnMySql.EstablishConnection With rdoQry .Name = "root" .SQL = "insert into regstudent (n_Student,age,sex,nationality,p_birth,d_birth,religion,f_name,tel,occupation,w_place,F_address,m_name,tel2,occupation2,w_place2,F2_address,prev_school,Location,grade_attained,aggregates,code) values ('Text1','Text2','Text3','Text4','Text5','Text6','Text7','Text8','Text9','Text10','Text11','Text12','Text13','Text14','Text15','Text16','Text17','Text18','Text19','Text20','Text21','Text22')" '.SQL = "Insert into regstudent (admin,tester,user2,user3,user4) VALUES ('101','202','303','404','505')" Set .ActiveConnection = cnMySql 'THIS LINE IS HIGHLIGHTED YOLEW Set rdoRS = .OpenResultset(rdOpenKeyset, rdConcurRowVer) End With rdoRS.Close cnMySql.Close 'End If End Sub Is This A Good Question/Topic? 0 Back to top MultiQuote Quote + Reply Replies To: Run-time error'40002' #2 maj3091 D.I.C Lover Reputation: 327 Posts: 1,945 Joined: 26-March 09 Re: Run-time error'40002' Posted 17 August 2012 - 07:33 AM The first question, is what is the DataType of Age in your database? Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #3 TFPTECH New D.I.C Head Reputation: 0 Posts: 6 Joined: 15-August 12 Re: Run-time error'40002' Posted 17 August 2012 - 07:52 AM maj3091, on 17 August 2012 - 07:33 AM, said:its an integer in the MYSQL table Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #4 maj3091 D.I.C Lover Reputation: 327 Posts: 1,945 Joined: 26-March 09 Re: Run-time error'40002' Posted 17 August 2012 - 08:09 AM Then try writing an integer to it and not a string. Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply ← Previous To
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Run-Time error '40002' Want to Advertise Here? Solved Run-Time error '40002' Posted on 1998-09-15 MS SQL http://www.dreamincode.net/forums/topic/289070-run-time-error40002/ Server 1 Verified Solution 6 Comments 1,611 Views Last Modified: 2008-03-06 My application is built on top of SQL Server 6.5. While trying to access the DB through the GUI, I encountered the following message: Run-Time error '40002' S1000:{Microsoft][ODBC SQL Server Driver]Connection is busy with results of another hstmt. Please advise. 0 Question by:chuatj Facebook Twitter LinkedIn https://www.experts-exchange.com/questions/10081108/Run-Time-error-'40002'.html Google Best Solution bymanish77 Try setting the result set to nothing before executing the next query. If you need it then assign it it some other result set . Go to Solution 6 Comments LVL 7 Overall: Level 7 MS SQL Server 5 Message Expert Comment by:spiridonov1998-09-15 What language do you use? 0 Message Author Comment by:chuatj1998-09-15 The GUI was developed using Visual Basic 5.0 and it communicates with SQL Server through RDO. 0 Message Expert Comment by:NateT1998-09-16 If you are running the rdoqueries async then just check the stillexecuting property before executing another query on the same database connection.... Same goes for stored procs. 0 Message Author Comment by:chuatj1998-09-16 In our application, we used two methods: 1. rdAsynEnable, and we did check the 'stillexecuting' property before executing the next query 2. rdConcurReadOnly, in this case, no checking is needed 0 Message Author Comment by:chuatj1998-09-21 Adjusted points to 100 0 Message Accepted Solution by:manish771998-09-22 Try setting the result set to n
360 games PC games https://support.microsoft.com/en-us/kb/942861 Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet mysql error Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All mysql error 40002 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
be down. Please try the request again. Your cache administrator is webmaster. Generated Wed, 19 Oct 2016 13:02:04 GMT by s_ac4 (squid/3.5.20)