473,789 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

run time error:item cannot be found in teh collection corresponding to the requested

140 New Member
Hi

its not working, i want only distinct record. here its repeated records coming.

accdb = "SELECT DISTINCT sequence FROM scene WHERE sceneid = '" & myquery & "' "

and when i select the first record in combo it says run time error:
item cannot be found in teh collection corresponding to the requested name or ordinal. but not for second records


help me. wht problem am facing
Feb 9 '07 #1
2 1711
Killer42
8,435 Recognized Expert Expert
Hi
its not working, i want only distinct record. here its repeated records coming.
accdb = "SELECT DISTINCT sequence FROM scene WHERE sceneid = '" & myquery & "' "
and when i select the first record in combo it says run time error:
item cannot be found in teh collection corresponding to the requested name or ordinal. but not for second records
To have much hope of sorting out wha is happening, I think we will need to see more of the code. Especially the line which produces the error.

Also, what version of VB are you using?
Feb 9 '07 #2
indhu
140 New Member
To have much hope of sorting out wha is happening, I think we will need to see more of the code. Especially the line which produces the error.

Also, what version of VB are you using?
VB 6.0 enterprise edition

Expand|Select|Wrap|Line Numbers
  1. Private Sub scenecombo_Click()
  2.  
  3. myconnection
  4.  
  5. myquery = scenecombo.Text
  6.  
  7. Call sceneLOAD
  8.  
  9.  Do While storyboard!sceneid <> myquery  error comes at this place
  10.  storyboard.MoveNext
  11.  If storyboard!sceneid = myquery Then
  12.  
  13. Call rLOAD
  14.  
  15.  panel_txt.Text = storyboard!panel
  16.  sequcombo.Text = storyboard!sequence
  17.  action_txt.Text = storyboard!Action
  18.  dialogue_txt.Text = storyboard!dialogue
  19.  Image1.Picture = LoadPicture(storyboard!Filename)
  20.  
  21.  End If
  22.  Loop
  23.  
  24.  
  25. accdb = "SELECT sceneid FROM scene WHERE sceneid = '" & myquery & "' "
  26. 'Load SQL query into a variable
  27.  
  28. Set storyboard = CON.Execute(accdb, adOpenStatic)
  29.  
  30. End Sub
Feb 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
400
by: Matthew Louden | last post by:
I am trying to implement the sort event in data grid. I set the data grid's AllowSorting property = True. I implement the following code that should be the event will fire when the user click any of the columns in the table: Private Sub dgReport1_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles dgReport1.SortCommand Dim sortOrder As String = e.SortExpression.ToString()...
5
5142
by: Nathan Sokalski | last post by:
When running a page I am working on, I recieve the following error: Cannot use a leading .. to exit above the top directory. I suspect this has something to do with the problem I posted in a recent posting "HyperLink.NavigateUrl always adds an extra ../ when going to a higher level directory" on Sunday, May 29, 2005 7:33 PM However, I cannot be sure because I cannot view the generated code since it gives the error before anything is...
1
5850
by: Vycka | last post by:
Hello, There is a enterprise web application that is based on asp.net technologies and works on Microsoft IIS. The total number of users is 850. When the load of system gets very high, the system stops working and all users are receiving an error (see at the bottom). Doing IISRESET or restarting server helps (but just until the next big load). Additional information: - Server OS MS Windows Server 2003 Standard edition SP1
2
3736
by: moondaddy | last post by:
I have a simple sample site I'm building in asp.net 2.0. I created a master page and a default.aspx content page in the project's root directory. Then I created a subfolder called content and added some aspx pages in the 'content' folder. when these pages were created I referenced the master page so everything should be linked up OK. Now, back on default.aspx I added a linkbutton and referenced one of the aspx pages in the 'content'...
10
7210
by: antonis | last post by:
When I restarting my pc a warning appears with the error cannot find the file C:\winnt\system32\1.tmp Please advice me how can I solve this problem Thanks
2
3739
by: fniles | last post by:
I am using VB.NET 2005 and MS Access. I use OLEDbCommand ExecuteNonQuery to delete a record from a database. Whenever the program gets a message, it creates a new thread to process that message. In the thread I open the database, then process the message. Sometimes I get an error "Error Cannot open action query ''". Why can it execute the query and how to fix it ? Thank you. Public Class Best
0
4573
by: SMH | last post by:
Hi All, I am currently learning .Net 2, studying for 70-528. I've hit a bit of a brick wall with DataColumn.Expression. As I understand it, this can be used to (For example) concatenate two columns to make a derived column. When I run my code, I get this error: ------------
2
15862
by: sam.barker0 | last post by:
Hi , I am having 3 functions.When I step through when func b returns to funca.it throws an error "cannot find function bounds" funca() { .... ... funcb(); }
0
204
by: Blubaugh, David A. | last post by:
Sir, Let me state that do have extensive experience with developing binary files. Please note that I have followed all of the instructions to the letter as far as developing a DLL to be imported. However, it is not working correctly. I believe it might be my system environment variables?? Thanks for your reply, David Blubaugh
0
10412
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.