Jump to content
Xtreme .Net Talk

Silv3rSurf3r_20

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Silv3rSurf3r_20

  1. Hey All, How is it that i get the data from the first column's from a listview when i click on it... as in... can you help me out with the syntax for that. ClientID = SearchList.SelectedItems(i). ? Thanks
  2. Hi All, This is a short SQL Question... how do i retrieve all the records of the people with the same name... Example: in a textbox i type in Adam and i click search... now this is supposed to check the database and list out all the Adam's in the database... i just need the SQL syntax for this... Comm.CommandText = "Select * From Customers WHERE " _ & "ClientID LIKE '" & ClientIDTxt.Text & "'" what is it that i add to this syntax? Thanks heaps ~John~
  3. Hey All, I have a quick question... how do i get a count of how many records are selected when i execute a SELECT query... like when it was in ADO with the use of .recordcount How do i do this in ADO.net Thanks ~John~
  4. Hey All, I'm trying to pull this off but am getting a problem... this is the code snippet ConnectToDatabase() Try myDataRow = myDataTable.NewRow() myDataRow.BeginEdit() myDataRow.Item("PatientID") = PatientIDTxt.Text myDataRow("Name") = NameTxt.Text myDataRow.EndEdit() myDataTable.Rows.Add(myDataRow) DAdapter.InsertCommand = commBuilder.GetInsertCommand DAdapter.Update(myDataSet) myDataTable.AcceptChanges() the error reads: object reference not set to an instance of an object ok i don't know what that means... me and vb.net haven't had to time to get aquainted... please help... Thank You
  5. Dynamic Sysop... pretty much figured out what my next problem would be... i can't get it to work... what's happening here is... i have to load some data from the database... and i have the MainFrm and my SearchFrm... which is where the user types in the ID or the name for that matter... now when i press search... it's supposed to retrieve the data (the procedure is written in the SearchFrm) and then display it in MainFrm... when i run this... i don't get anything on my MainFrm... it's just plain blank... what do i do now?
  6. I have added this to a Dataset and am just wondering how i actually insert it into a database... i chose this way of writing i guess because it's easier to debug at the end of the day and it's definately easier on the eyes... help please? this is a snippett of the code... DAdapter.Fill(myDataSet, "PersonalDetails") myDataRow = myDataSet.Tables.Add("PersonalDetails").NewRow myDataRow("PatientID") = PatientIDTxt.Text myDataRow("Name") = NameTxt.Text myDataRow("Address") = AddressTxt.Text myDataRow("Category") = CategoryCmb.SelectedIndex myDataRow("DateCreated") = CreatedTxt.Text myDataRow("Dentist") = DentistCmb.SelectedIndex myDataRow("DOB") = DOBTxt.Text Thank You
  7. Hey All, I guess this is a short question... i'm trying another way around inserting data into my database... i'm currently trying to load my data into a Dataset and then store it in a database... my question is... i've looked at a couple of code samples to get this done so far... i'm just a little puzzled... in the code samples they don't say where you have to put the SQL Command bit in... could you help me out with this bit.. DAdapter.Fill(myDataSet, "PersonalDetails") myDataRow = myDataSet.Tables.Add("PersonalDetails").NewRow myDataRow("PatientID") = PatientIDTxt.Text myDataRow("Name") = NameTxt.Text myDataSet.Tables("PersonalDetails").Rows.Add(myDataRow) Thanks ~John~
  8. Hey all, I have a question regarding listviews... i have my data in a listview and my listview currently has four columns... how do i take the data from the list and break them up and put them in seperate variables... Like for instance... "111", "test", "21", "good to go" this is probably an example of a line that's in my listview... how do i click on this now and make it read the line and break them up and store them in seperate variables.... one for each column Thanks... ~John~
  9. Good day all, i have a pretty simple question... but i don't know how to get it done in VB.net.. i haven't had the time to learn up OOP fully so i can't really figure this out as yet... I have a couple of forms... and i'm trying to pass somethings from a couple of textboxes in Form 2 to a listbox in Form1... intially it was pretty simple... but with VB.net being restructured can someone shed some light on how this should be done now... Cheers ~John~
  10. ok thank wyrd... it works now... got a question for you though... quite used to the idea of doing things in ado and then i migrated to ado.net is there another way you can insert values into the database... like the way ado did it... so it was easier to check where the error statement was coming from... because right nowi have a whole chunk of an insert into command... and when it kicks out i don't know where exactly the error was generated from... any tips on how i could get this done?
  11. ok got the connection to get working now... my final question would be... how do i insert the values from a text box i.e. PatientIDTxt.Text it's not VALUES (PatientIDTxt.Text) is it? tried that... it doesn't work...
  12. it seems the problem comes from the databasecon.open bit my connection string looks pretty normal... this is what it looks like DatabaseCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " & Application.StartupPath & "\Database\DesaDentalDatabase.mdb" it's declared publically in a class module... am i missing out something here... it used to work... now it's gone strange on me...
  13. hey people... i don't know what the problem is wit this block of try and catch... i can't seem to insert anything into my database which is an Access Database here's the code snippet Try DatabaseCon.Open() Try Comm.Connection = DatabaseCon Comm.CommandText = "INSERT INTO PersonalDetails(PatientID, Name, Age) VALUES(234, 'test', 17)" Comm.ExecuteNonQuery() Finally DatabaseCon.Close() End Try Catch ex As Exception MsgBox(ex) End Try the error i get is... Argument 'Prompt' cannot be converted to type 'String' please advice... thank you
  14. Hey wyrd... ok tried what you've told me to do but am facing this problem... I get an error that says "Additional information:'Prompt' cannot be converted to type 'String'" this is what my code looks like Comm.CommandText = "INSERT INTO PersonalDetails "_ & "(PatientID, Name) VALUES ('123','Test')" Comm.ExecuteQuery() ok this doesn't seem to be working for me at this point... what idiotic thing have i done wrong? Thank You
  15. ok thanks with that... but i've got more than one piece of data to go into this table...
  16. Hey All, I know this is a really dumb question to ask but I just don't know how to accomplish this using ADO.net... so i'm asking for help... I've created a VB application and i need to insert data into an Access Database.. I've read some tutes and they have a whole load of codes just to do an insert statement... can someone help me out with this... i need to insert some data into a table called "PersonalDetails" Here's a snippet of the code... but it doesn't work.. Please help Comm.Connection = DatabaseCon Comm.CommandText = "INSERT INTO PersonalDetails" Comm.Parameters("PatientID").Value = PatientIDTxt.Text Comm.ExecuteNonQuery() Thank You
  17. i'm trying to get the data stored in a database... so i'm just expecting the index number out of the radio buttons so i can store them in the database... and it makes it so much easier to handle instead of having to write procedures for each of the radiobuttons...
  18. Hey Robby, Thanks for the reply... but i think i'll need more information on how to create a control array... if you could help me out here... ok for example... if i had 3 radiobuttons and i wanted to have them as a control Array called RatingRB and it is supposed to have Rating(0), Rating(1) and Rating(2)... how do i go about doing this... Thanks In Advance...
  19. Hey all, I have just decided to upgrade a college project i was working on to visual basic.net and have found that .net doesn't allow for someone to create radio button arrays... and text field arrays... which i relied heavily upon in this project... how do i go about working on this now? I've tried looking through the msdn website and haven't found any information that can help... And also... i aslo have a problem with my list view... it works fine and all... but there's just so much space between 2 lines of information... how do i minimise this space... Thank You...
×
×
  • Create New...