![]() I've found that by commenting functions and code blocks that this code I've shared makes the program freeze, I've wanted to implement async-await to overcome that, I've even deleted tables, there was only 2 table left, but it still freezed -only for 3 seconds, after that it works, but sometimes it never freezes which leaves me confused-, so I'm thinking that its not about the number of the tables? SqlDataReader reader = cmd.ExecuteReader() SqlCommand cmd = new SqlCommand(sql, myDatabase) String sql = "select * from " + tablename +" " Private string check_for_user_id(string tablename) Private DataRow get_table_names(SqlConnection myDatabase)ĭataTable table = myDatabase.GetSchema("Tables") If (Convert.ToString(item) != "users")ĭeck_ers_decks.Add((Convert.ToString(item))) If (Deck_ers_decks.Contains(Convert.ToString(item)) = false) If (check_for_user_id(Convert.ToString(item)) = Convert.ToString(this.get_UserID())) Code var selectNames = get_table_names(myDatabase) //freeze hereįoreach (var item in selectNames) //freezing I've been coding a Quizlet/Anki Clone where I need to take all the table names from the database, and there is a code block in my program about that, which makes my program freeze like 3 seconds. Hey there, I'm a freshmen who is trying to practice some stuff,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |