Search Results

Search found 13112 results on 525 pages for 'exception duck'.

Page 72/525 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • Strange Exception on getGeneratedKeys() with JDBC for MySQL 5.1

    - by sweeney
    Hello, I'm using JDBC to insert a row into a MYSQL database. I build a parameterized command, execute it and attempt to retrieve the auto generated keys as follows: String sql = "INSERT IGNORE INTO `users` (`email`, `pass-hash`) VALUES (?, ?)"; Connection conn = SQLAccess.getConnection(); PreparedStatement ps = conn.prepareStatement(sql); ps.setString(1, login); ps.setString(2, passHash); int count = ps.executeUpdate(); if (count == 1) { ResultSet rs = ps.getGeneratedKeys(); rs.next(); //some more stuff... } For some reason, I get the following SQLException on the line containing ResultSet rs = ps.getGeneratedKeys();: !Statement.Generated Keys Not Requested! Any thoughts? When I run the same query, as generated by running the app through the debugger, in a MySQL browser it executes without incident. Thanks, brian

    Read the article

  • Java 7u4 webstart security exception: Class does not match trust level

    - by Glstunna
    We began to notice that with Java 7 (particularly with update 4), that all our users began to see this with our Webstart app: [14:42:58,422] AWT-EventQueue-0(DEBUG) java.lang.SecurityException: class "CLASSNAME" does not match trust level of other classes in the same package [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at java.net.URLClassLoader$1.run(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at java.net.URLClassLoader$1.run(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at java.security.AccessController.doPrivileged(Native Method) [14:42:58,422] AWT-EventQueue-0(DEBUG) at java.net.URLClassLoader.findClass(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at java.lang.ClassLoader.loadClass(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at java.lang.ClassLoader.loadClass(Unknown Source)...More Where CLASSNAME = pretty much every class at random points from several jars in the app execution, breaking several behavior. If our users were to use Java 6, they have no problems! Just 7 (update 4). We sign ALL our jars, both the main application jar and it's library jars. i.e Users launching our webstart app see the blue shield instead of yellow or red. This is obviously an issue as users are more frequently now upgrading to Java 7. I have tried to force our app to use Java 6 on the user machine either by using a previous installation(works), or installing a new one....with the j2se version="1.6" tag around resources but this causes it's own problems that would probably be best to make into it's own thread (the auto-jre-installation part). Did Oracle break Webstart security with Java 7u4? How do I solve this securityexception issue?

    Read the article

  • .net framework execution aborted while executing CLR sproc?

    - by Sean Ochoa
    I constructed a sproc that does the equivalent of FOR XML AUTO in SQL 2008. Now that I'm testing it, it gives me a really unhelpful error msg. Any idea what this error means? Msg 10329, Level 16, State 49, Procedure ForXML, Line 0 .Net Framework execution was aborted. System.Threading.ThreadAbortException: Thread was being aborted. System.Threading.ThreadAbortException: at System.Runtime.InteropServices.Marshal.PtrToStringUni(IntPtr ptr, Int32 len) at System.Data.SqlServer.Internal.CXVariantBase.WSTRToString() at System.Data.SqlServer.Internal.SqlWSTRLimitedBuffer.GetString(SmiEventSink sink) at System.Data.SqlServer.Internal.RowData.GetString(SmiEventSink sink, Int32 i) at Microsoft.SqlServer.Server.ValueUtilsSmi.GetValue(SmiEventSink_Default sink, ITypedGettersV3 getters, Int32 ordinal, SmiMetaData metaData, SmiContext context) at Microsoft.SqlServer.Server.ValueUtilsSmi.GetValue200(SmiEventSink_Default sink, SmiTypedGetterSetter getters, Int32 ordinal, SmiMetaData metaData, SmiContext context) at System.Data.SqlClient.SqlDataReaderSmi.GetValue(Int32 ordinal) at System.Data.SqlClient.SqlDataReaderSmi.GetValues(Object[] values) at System.Data.ProviderBase.DataReaderContainer.CommonLanguageSubsetDataReader.GetValues(Object[] values) at System.Data.ProviderBase.SchemaMapping.LoadDataRow() at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at ForXML.GetXML...

    Read the article

  • How to handle data output in an Observer?

    - by Mannaz
    I have an Observable and an Observer. The observable does download some stuff in a background thread and calls notifyObservers to let the observers read the status. At some point in public void update the observer tries to updates the GUI ((TextView)findViewById('R.id.foo')).setText("bar"); but it seems like the observable thread calls this method, because the Observable (!!!) throws this: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRoot.checkThread(ViewRoot.java:2462) at android.view.ViewRoot.requestLayout(ViewRoot.java:512) ... at com.mynamespace.acitivty.TrackActivity.startPlay(TrackActivity.java:72) at com.mynamespace.acitivty.TrackActivity.update(TrackActivity.java:107) at java.util.Observable.notifyObservers(Observable.java:147) at java.util.Observable.notifyObservers(Observable.java:128) at com.mynamespace.module.communication.Download.stateChanged(Download.java:213) at com.mynamespace.module.communication.Download.run(Download.java:186) at java.lang.Thread.run(Thread.java:1058) Is there some way I can prevent this from happening? I'm sure I'm missing something obvious here.

    Read the article

  • Throwing exception vs returning null value with switch statement

    - by Greg
    So I have function that formats a date to coerce to given enum DateType{CURRENT, START, END} what would be the best way to handling return value with cases that use switch statement public static String format(Date date, DateType datetype) { ..validation checks switch(datetype){ case CURRENT:{ return getFormattedDate(date, "yyyy-MM-dd hh:mm:ss"); } ... default:throw new ("Something strange happend"); } } OR throw excpetion at the end public static String format(Date date, DateType datetype) { ..validation checks switch(datetype){ case CURRENT:{ return getFormattedDate(date, "yyyy-MM-dd hh:mm:ss"); } ... } //It will never reach here, just to make compiler happy throw new IllegalArgumentException("Something strange happend"); } OR return null public static String format(Date date, DateType datetype) { ..validation checks switch(datetype){ case CURRENT:{ return getFormattedDate(date, "yyyy-MM-dd hh:mm:ss"); } ... } return null; } What would be the best practice here ? Also all the enum values will be handled in the case statement

    Read the article

  • mysql and .net: when using tableadapters I'm getting MySqlException "insert command denied for user"

    - by Deveti Putnik
    Hi! I am using mysql as db for my asp.net application. Here are the facts: I am using connection string from web.config which has both username and password. I can do SELECT with tableadapter. When I am trying to do INSERT with tableadapter, I am getting "mysqlexception insert command denied for user" error When I try to do INSERT programatically, i.e. using connection, command object, etc. everything is fine. In this case, I'm reading connection string from web.config, too. This can be only applied to GoDaddy hosting, but on local machine I don't have this kind of problems. Can anyone suggest what can I do to make it work on GoDaddy hosting? Regards, D

    Read the article

  • MyMessage<T> throws an exception when calling XmlSerializer

    - by Arthis
    I am very new to nservicebus. I am using version 3.0.1, the last one up to date. And I wonder if my case is a normal limitation of NSB, I am not aware of. I have an asp.net MVC application, I am trying to setup and in my global.asax, I have the following : var configure = Configure.WithWeb() .DefaultBuilder() .ForMvc() .XmlSerializer(); But I have an error with the XmlSerializer when dealing with one of my object: [Serializable] public class MyMessage<T> : IMessage { public T myobject { get; set; } } I pass trough : XmlSerializer() instance.Initialize(types); this.InitType(type, moduleBuilder); this.InitType(info2.PropertyType, moduleBuilder); and then when dealing With T, string typeName = GetTypeName(t); typename is null and the following instruction : if (!nameToType.ContainsKey(typeName)) ends in error. null value not allowed. Is this some limitations to Nservicebus, or am I messing something up?

    Read the article

  • Wcf exception handling

    - by pdiddy
    I noticed that if you do a throw new InvalidCastException for example, the channel state on the client side is faulted. But if you throw new FaultException, the channel state on the client side is opened. By curiosity, what is the reason why one faults the channel and the other doesn't?

    Read the article

  • Sharepoint Variations Error

    - by marcocampos
    I'm getting some crazy errors when trying to create variations in Sharepoint. Has anybody seen this error? PublishingPage::AttemptPairUpWithPage() Ends. this: http://wseasp05/PT/Paginas/Destaque1.aspx, destPageUrl: /ES/Paginas/Destaque1.aspx Begin DeploymentWrapper::SynchronizePeerPages(), sourcePage = Paginas/Destaque1.aspx DeploymentWrapper::SynchronizePeerPages(), synchronizeDestUrl = /ES/Paginas/Destaque1.aspx Access to the path 'C:\Windows\TEMP\11c7c12e-030d-4860-a942-f5ab71f0930d\ExportSettings.xml' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileInfo.Create() at Microsoft.SharePoint.Deployment.Ex... ...portDataFileManager.Initialize() at Microsoft.SharePoint.Deployment.SPExport.InitializeExport() at Microsoft.SharePoint.Deployment.SPExport.Run() Export Completed. DeploymentWrapper.SynchronizePeerPages() catches UnauthorizedAccessException. Spawn failed for /ES/Paginas/Destaque1.aspx End of DeploymentWrapper.SynchronizePeerPages() Thanks in advance.

    Read the article

  • Extending Throwable in Java

    - by polygenelubricants
    Java lets you create an entirely new subtype of Throwable, e.g: public class FlyingPig extends Throwable { ... } Now, very rarely, I may do something like this: throw new FlyingPig("Oink!"); and of course elsewhere: try { ... } catch (FlyingPig porky) { ... } My questions are: Is this a bad idea? And if so, why? What could've been done to prevent this subtyping if it is a bad idea? Since it's not preventable (as far as I know), what catastrophies could result? If this isn't such a bad idea, why not? How can you make something useful out of the fact that you can extends Throwable?

    Read the article

  • Null Pointer Exception while using Java Compiler API

    - by java_geek
    MyClass.java: package test; public class MyClass { public void myMethod(){ System.out.println("My Method Called"); } } Listing for SimpleCompileTest.java that compiles the MyClass.java file. SimpleCompileTest.java: package test; import javax.tools.*; public class SimpleCompileTest { public static void main(String[] args) { String fileToCompile = "test" + java.io.File.separator +"MyClass.java"; JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); int compilationResult = compiler.run(null, null, null, fileToCompile); if(compilationResult == 0){ System.out.println("Compilation is successful"); }else{ System.out.println("Compilation Failed"); } } } I am executing the SimpleCompileTest class and getting a NullPointerException. The ToolProvider.getSystemJavaCompiler() is returning null. Can someone tell me what is wrong with the code

    Read the article

  • CommunicationException in WCF

    - by user343159
    Hi I have a problem with a WCF Service I've just created. This was working yesterday but for some reason it's just stopped working. One of my WCF methods returns an array of an Entity Framework entity, like this: public BranchContactDetail[] GetClosestBranches(string postcode, int howManyBranches) { GeoLocation geoLocation = GetLocationFromPostcode(postcode); Location location = new Location(geoLocation.Latitude, geoLocation.Longitude); using (BranchDirectoryEntities entities = new BranchDirectoryEntities()) { var branchesInOrder = entities.BranchContactDetails .Where(b => b.latitude.HasValue && b.longitude.HasValue ) .OrderBy(b => location.DistanceFrom(b.latitude, b.longitude)) .Take(howManyBranches) .ToArray(); return branchesInOrder; } } ...and, as I say, this was working fine yesterday. Now I'm getting a "The underlying connection was closed: The connection was closed unexpectedly." I've hunted all over the web but no-one seems to know the answer. Anyone shed any light on this issue? Regards, Mark

    Read the article

  • Dispatch request to an Async Servlet from managed bean generate exception

    - by Thang Pham
    when a button click, I need to have stuff running in my background, so I have a async Servlet. From my managed bean, if I do redirect, it works great (meaning that it execute my run() method inside my class that extends Runnable correctly). Like this String url = externalContext.getRequestContextPath() + "/ReportExecutionServlet"; externalContext.redirect(url); But if I switch to dispatch, like this externalContext.redirect("/ReportExecutionServlet"); it fail when I try to obtain the AsyncContext AsyncContext aCtx = request.startAsync(request, response); The error is below Caused By: java.lang.IllegalStateException: The async-support is disabled on this request: weblogic.servlet.internal.ServletRequestImpl Any idea how to fix this please? NOTE: This is how to execute my async servlet, just in case: AsyncContext aCtx = request.startAsync(request, response); //delegate long running process to an "async" thread aCtx.addListener(new AsyncListener() { @Override public void onComplete(AsyncEvent event) throws IOException { logger.log(Level.INFO, "ReportExecutionServlet handle async request - onComplete"); } @Override public void onTimeout(AsyncEvent event) throws IOException { logger.log(Level.WARNING, "ReportExecutionServlet handle async request - onTimeout"); } @Override public void onError(AsyncEvent event) throws IOException { logger.log(Level.SEVERE, "ReportExecutionServlet handle async request - onError"); } @Override public void onStartAsync(AsyncEvent event) throws IOException { logger.log(Level.INFO, "ReportExecutionServlet handle async request - onStartAsync"); } }); // Start another service ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(10); executor.execute(new AsyncRequestReportProcessor(aCtx));

    Read the article

  • GlassFish Starting Up Java SE Client - No Initial Context Exception

    - by Marcel
    Hi I have developed a java se client that calls some session beans on a glassfish server. I connect to the bean remote interface like this. context = new InitialContext(); em = (ICrudService) context.lookup("java:global/BackITServer/CrudServiceImpl"); This works fine from inside eclipse (gf-client on build path). When I export my project as a runnable jar and call it on the console with java -jar BackItClient.jar I get a NoInitialContextException. MMMM. I would very much appreciate some help. Thank You Greetings Marcel PS: Do I really have to pack all the jars which gf-client is referencing into my jar?

    Read the article

  • Classnotfound exception while running hadoop

    - by vana
    Hi, I am new to hadoop. I have a file Wordcount.java which refers hadoop.jar and stanford-parser.jar I am running the following commnad javac -classpath .:hadoop-0.20.1-core.jar:stanford-parser.jar -d ep WordCount.java jar cvf ep.jar -C ep . bin/hadoop jar ep.jar WordCount gutenburg gutenburg1 After executing i am getting the following error: lang.ClassNotFoundException: edu.stanford.nlp.parser.lexparser.LexicalizedParser The class is in stanford-parser.jar ... What can be the possible problem? Thanks

    Read the article

  • Printing gives unhandled exception. Access Denied

    - by Smoka
    Im newish to coding, currently on a Windows Forms App using CLI in VS10 Everything seems to work, my document shows fine in the Preview dialog but then crash's. Heres only the code that seems relevant private: System::Drawing::Printing::PrintDocument^ docPrint; private: System::Windows::Forms::PrintDialog^ dlgPrint; private: System::Windows::Forms::PrintPreviewDialog^ dlgPrintPreview; this->button2 = (gcnew System::Windows::Forms::Button()); this->docPrint = (gcnew System::Drawing::Printing::PrintDocument()); this->dlgPrint = (gcnew System::Windows::Forms::PrintDialog()); this->dlgPrintPreview = (gcnew System::Windows::Forms::PrintPreviewDialog()); this->button2->Location = System::Drawing::Point(152, 355); this->button2->Name = L"button2"; this->button2->Size = System::Drawing::Size(75, 23); this->button2->TabIndex = 53; this->button2->Text = L"Print"; this->button2->UseVisualStyleBackColor = true; this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click_1); // // docPrint // this->docPrint->DocumentName = L"ResultsPage"; this->docPrint->PrintPage += gcnew System::Drawing::Printing::PrintPageEventHandler(this, &Form1::docPrint_PrintPage); // // dlgPrint // this->dlgPrint->Document = this->docPrint; this->dlgPrint->UseEXDialog = true; // // dlgPrintPreview // this->dlgPrintPreview->AutoScrollMargin = System::Drawing::Size(0, 0); this->dlgPrintPreview->AutoScrollMinSize = System::Drawing::Size(0, 0); this->dlgPrintPreview->ClientSize = System::Drawing::Size(400, 300); this->dlgPrintPreview->Document = this->docPrint; this->dlgPrintPreview->Enabled = true; this->dlgPrintPreview->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"dlgPrintPreview.Icon"))); this->dlgPrintPreview->Name = L"dlgPrintPreview"; this->dlgPrintPreview->Visible = false; this->dlgPrintPreview->Load += gcnew System::EventHandler(this, &Form1::dlgPrintPreview_Load); private: System::Void docPrint_PrintPage(System::Object^ sender, System::Drawing::Printing::PrintPageEventArgs^ e) { String ^ strDisplay = L"A Axis Rotations"; String ^ strDisplay2 = L"Centerline of Y" + CL_Y->Text + " + Z" + CL_Z->Text; String ^ strDisplay3 = L"Initial Position Y" + G54_Y->Text + " + Z" + G54_Z->Text; System::Drawing::Font ^ fntString = gcnew System::Drawing::Font(L"Times New Roman", 38, FontStyle::Bold); e->Graphics->DrawString(strDisplay, fntString, Brushes::Black, 200,20); e->Graphics->DrawString(strDisplay2, fntString, Brushes::Black, 80,150); e->Graphics->DrawString(strDisplay3, fntString, Brushes::Black, 80,220); e->Graphics->DrawString(Results->Text, fntString,Brushes::Black, 50,400); } private: System::Void button2_Click_1(System::Object^ sender, System::EventArgs^ e) { // docPrint->Print; dlgPrintPreview->ShowDialog(); } private: System::Void dlgPrintPreview_Load(System::Object^ sender, System::EventArgs^ e) { } Sorry if the formatting is ugly here.

    Read the article

  • Error : The Type Initializer of Deamon.Global threw an exception in c#

    - by srk
    I am using the below class file, where some variables are declared to use in the entire application. Now i used that variable [BlockLogOut] in another class file to make the value True. I just put this below line and getting error in it.. "TypeInitializationException" Global.BlockLogOut = True; The wired thing is, it was working fine for many months and i am getting this error now on the above line. Of course i was modifying some other stuffs in the application, but surely not this class file. What would have been the problem ? namespace Daemon { class Global { public static bool BlockLogOut = false; } }

    Read the article

  • Handling Errors in PHP

    - by Mike
    I have a custom class that, when called, will redirect to a page and send a 'message_type' and 'message' variable via GET. When the page opens it checks for these variables and displays a 'success', 'warning', or 'error' message depending on the 'message_type' variable. I made it so the user thinks they stay on the same page. It also allows for other variables to be passed along with the message. Is this good practice, or should I just start using exceptions? Example: //Call a static function that will redirect to a page, with an error message RedirectWithMessage::go('somepage.php', MessageType::ERROR, 'Error message here.'); The following checkMessage() function is an include file: function checkMessage() { if((isset($_GET['message_type']) && strlen($_GET['message_type'])) && (isset($_GET['message']) && strlen($_GET['message_type']))) { DisplayMessage::display($_GET['message_type'], $_GET['message']); return true; } return false; } On the page that is redirected to, call checkMessage(); //If a message is received, display it. If not, do nothing checkMessage(); I know this might be vague, and I can supply more code if necessary. I guess the issue is that I don't have much experience using exceptions, but I think they seem cumbersome (writing try-catch blocks everywhere). Please let me know if I am making this more difficult for myself or if there is a better solution. Thanks! Mike

    Read the article

  • DynamicMethod NullReferenceException

    - by Jeff
    Can anyone tell me what's wrong with my IL code here? IL_0000: nop IL_0001: ldarg.1 IL_0002: isinst MyXmlWriter IL_0007: stloc.0 IL_0008: ldloc.0 IL_0009: ldarg.2 IL_000a: ldind.ref IL_000b: unbox.any TestEnum IL_0010: ldfld Int64 value__/FastSerializer.TestEnum IL_0015: callvirt Void WriteValue(Int64)/System.Xml.XmlWriter IL_001a: nop IL_001b: ret I'm going crazy here, since I've written a test app which does the same thing as above, but in C#, and in reflector the IL code from that looks just like my DynamicMethod's IL code above (except my test C# app uses a TestStruct with a public field instead of the private value field on the enum above, but I have skipVisibility set to true)... I get a NullReferenceException. My DynamicMethod's signature is: public delegate void DynamicWrite(IMyXmlWriter writer, ref object value, MyContract contract); And I'm definitely not passing in anything null. Thanks in advance!

    Read the article

  • XamlReader.Parse throws exception on empty String

    - by sub-jp
    In our app, we need to save properties of objects to the same database table regardless of the type of object, in the form of propertyName, propertyValue, propertyType. We decided to use XamlWriter to save all of the given object's properties. We then use XamlReader to load up the XAML that was created, and turn it back into the value for the property. This works fine for the most part, except for empty strings. The XamlWriter will save an empty string as below. <String xmlns="clr-namespace:System;assembly=mscorlib" xml:space="preserve" /> The XamlReader sees this string and tries to create a string, but can't find an empty constructor in the String object to use, so it throws a ParserException. The only workaround that I can think of is to not actually save the property if it is an empty string. Then, as I load up the properties, I can check for which ones did not exist, which means they would have been empty strings. Is there some workaround for this, or is there even a better way of doing this?

    Read the article

  • System.IndexOutOfRange Exception Sending Gridview Values to DataTable

    - by SidC
    Hello, I am writing an ASP.NET 3.5 application and need to send gridview values to a datatable for use in a listbox control as part of a quote process. I have written the following VB code in my Page_Load: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim dtSelParts As DataTable = New DataTable("dtSelParts") Dim column As DataColumn = New DataColumn column.ColumnName = "PartName" column.ColumnName = "PartNumber" column.ColumnName = "Quantity" dtSelParts.Columns.Add(column) For Each row As GridViewRow In MySearch.Rows Dim drSelParts As DataRow drSelParts = dtSelParts.NewRow() For i As Integer = 0 To row.Cells.Count - 1 drSelParts(i) = row.Cells(i).Text Next Next End Sub When I run the partsearch.aspx page, I enter values in the row textbox for parts I want included in the listbox (to be included in quote). However, I receive the error message System.Index.OutOfRangeException: Cannot find column 1 which occurs on the line drSelParts(i) = row.Cells(i).Text. How might I correct the code and resolve the error? Thanks, Sid

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >