TIMEOUT

האזרחק

New member
TIMEOUT

אחת הפעולות שמתבצעת כשבוחרים פריט ב SELECT BOX לוקחת הרבה זמן ומדי פעם מתקבלת הודעת שגיאה לגבי TIMEOUT - איך ניתןו להאריך את זמן הריצה לאותה פונקציה (או לאותו דף או לכל האפליקציה)? הודעת השגיאה:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Source Error: Line 151: Line 152: objCommand.Connection = SqlConnection Line 153: objReader = objCommand.ExecuteReader Line 154: first = 0 Line 155:​
 

האזרחק

New member
תודה ובעיה נוספת באותו עניין

הבעיה נפתרה לגבי שימוש ב COMMAND, אבל היא מופיעה גם פה:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Source Error: Line 146: CommandText = GetWhereClause() & " order by " & GetSortField() Line 147: Dim myCommand As New System.Data.SqlClient.SqlDataAdapter(CommandText, SqlConnection) Line 148: myCommand.Fill(ds) Line 149: Me.DataGrid1.DataSource = ds Line 150: Me.DataGrid1.DataBind()​
 

adam222

New member
זו לא בעיה נוספת

זו אותה בעיה, הפתרון זהה. לפני ה-Fill
 

האזרחק

New member
זה לא אותו אובייקט

ל- SqlDataAdapter אין את הפרמטר של ה TIMEOUT... (הוא נקרא MYCOMMAND אבל הוא לא COMMAND)
 

adam222

New member
2 בעיות

1. למה לקרוא לאינסטנס של אובייקט DataAdapter בשם Command (דבר מטעה שגם אני נפלתי עליו) 2. מפי אלוהים (אין {על} אלוהים
)
Reading and Updating with Data Adapters The primary purpose of the data adapter is to communicate data between a data store and a dataset. The adapter supports specific methods to move the data back and forth between the two. Note If you just want to read data (not update it), you do not have to store it in a dataset. Instead, you can read directly out of the database and into an application. For details, see "Read-Only Data" below. You can use a data adapter to perform the following operations: Retrieve rows from a data store into corresponding data tables within the dataset. To retrieve rows into a dataset, use the Fill method on a data adapter object (SqlDataAdapter, OleDbDataAdapter, OdbcDataAdapter, or OracleDataAdapter). When you invoke the Fill method, it transmits an SQL SELECT statement to the data store. Transmit changes made to a dataset table to the corresponding data store. To transmit a dataset table of the dataset to the data store, use the adapter's Update method. When you invoke the method, it executes whatever SQL INSERT, UPDATE or DELETE statements are needed, depending on whether the affected record is new, changed, or deleted. For details about how updates are performed using data adapters, see Dataset Updates in Visual Studio .NET.​
מתוך ה-MSDN
 

adam222

New member
חסר

In all cases, the connection object represents a unique session within the data source. All connection objects provide properties to establish and modify connection details (such as user ID and password, and connection-timeout setting). They also provide methods to begin, commit, and roll back database transactions. For details about connection objects, see Connecting to Data Sources with ADO.NET.​
 

האזרחק

New member
המממ...

החלפתי את השם :) מה הלאה? איך אפשר להעביר את המידע מה גATAADAPTER ישירות אל הGRID בלי להשתמש ב DATASET?
 

adam222

New member
באמצעות שימוש

ב-DataTable, או אובייקט מסוג iCollection או ב-DataView... ייתכן ועוד דרכים, אבל אלה פופלריים ומספקים ת'תוצאה...
 
למעלה