Jump to content
Xtreme .Net Talk

fkheng

Avatar/Signature
  • Posts

    156
  • Joined

  • Last visited

Everything posted by fkheng

  1. hm......i'm still confused with the explanations...so sorry if i'm bothering with the questions... does anyone have another wya of explaning it?
  2. i see, so a data field in a datarow is generally viewed as an object? so the field type which i state in the ms access database is not recognised in .net till i convert it? like in my case, the field is of a text type in the database table, but i have to convert it to string before i can use it?
  3. i see, er......how would it differ if i placed the connection in the class not in the module? how do i use it then? any difference in syntax or writing the codes to use the connection from the class?
  4. yeap it is a datareader i see... thanx, just found out that i can do the same with a datarow in a dataset... er.....i have another question dr("UserName") = DirectCast(dr("UserName"), String).ToUpper dr is a datarow in my db, username is declared as a text type is it necessary to convert it to a string type? can i directly use it?
  5. oh, i got it, i did not open the connection, thanx a lot!
  6. i see, hm......so u're reusing the connection for various other forms wat if i do not reuse it, but create new connections for each form, would that affect the efficiency of the program? or any issues here?
  7. i see, but i don't get the part when they mention that DirectCast requires the run-time type of an object variable...
  8. i see, er........would it be less efficient to create a few more database connections than to just maintain and reuse a single connection variable?
  9. tried that, but they said "CREATE not declared", weird, where should i put this line of code?
  10. er......not a dropdown but a value from a database field...
  11. i see...which means i can't share a connection?
  12. oh yah, one more thing, the function is located in a module, where i declare the conn value as public, so i assume that my form can make use of the conn variable with no problems? am i wrong here? or must i pass back the conn value to the function caller and assign it to a local variable?
  13. initialiseDB() sqlStr = "SELECT * FROM LoginTable" command = New OleDbCommand() command.CommandText = sqlStr command.Connection = conn reader = command.ExecuteReader() my code halts at reader = command.executereader, and the error i get is that i am carrying out an invalid operation the conn value i assign to command.connection is initialised in a function which i call called initialiseDB i do not know why it stops here, can someone help me out?
  14. What is the code for creating a table in SQL Server 2k which i should use for my ASP .NET application?
  15. hm....... i mainly have many lines of code which are kind of similar, especially when i have many buttons on my form which, when clicked, connect to the database to carry out some operations... i plan to centralise these lines of code, so that they can all be reused... any ideas?
  16. i see, haih...then the purpose of inheritance in vb.net plays a very little role am i right? coz many things in vb are done thru the interface... so my code on a form can't inherit a class? haih... really no other way? if not i'll have to define the functions in a module...and call the functions that way, would that be better? in fact, is that similar to inheritance?
  17. When I create a form in vb.net, vb automatically makes use of Inherits System.Windows.Forms.Form With this, I am unabvle to inherit other classes as it is already taken up by this. Is this necessary? Is there another way aroun this problem?
  18. is it proper to reuse a same oledbconnection over and over again, being defined in a main module so that it can be shared by forms which need it at a particular time? instead of creating new connection objects all over? are there a ny issues involved here?
  19. Apart from obtaining a value using blabla.getString(0) for example, are there other ways of obtaining it (other syntax?) for example by specifying the field name instead?
  20. Can somebody explain to me the difference between directcast and ctype? i read the msdn, but could not understand it... wat do they mean when they say that directcast requires the run time type of the object variable whereas ctype doesn't? could someone explain these to me?
  21. hey, jsut have another question, i know it is after a long time since u last posted in this thread...well, is it proper to reuse a same oledbconnection over and over again, being defined in a main module so that it can be shared by forms which need it at a particular time? instead of creating new connection objects all over? are there a ny issues involved here?
  22. er........may i ask? wat is the .repaint for? also, is this the only way to solve the problem about the splashscreen ending the whole program? wat if i'm facing this problem not at the startup? don't tell me i will have to open all forms in advance and just hide them b4 i use them?
  23. okay, which means i am actually opening other forms first...hm......okok, will try that also, in VB6, i have a way of disabling people from entering text into a textbox when they tried to key it in by setting KeyAscii = 0 under the keypress event, but in VB.NET, the keypress event does not have this, i have tried the e.empty event but doesn't seem to work, is that the right one? or is there another way to do so ? i want to do this without having to disable the text box as this will darken the textbox, i don't want that...
  24. er........somnehow when i use me.close my hold program closes my code sequence is like this : form2.show() me.close() is the sequence of code correct? coz i want form2 to appear then close the current form...
  25. I want to begin learning on the networking basics in VB.NET on how to establish a connection or how to do some basic networking functionality, does anybody know of a good link or tutorial which i can learn from?
×
×
  • Create New...