Hi Guys,
Just covered a few chapters in my Wrox book on ADO.net.
Its all going just swell .........but Im not following one section to well.
Im sending Parimeter & Non Parimeter Queries to my database...
One of the database fields has an ID column and has a GUID as its value, in a lesson I covered I made a small application that generates a new GUID for me and when I need to add a record to the database I can paste it in.....No probs all works fine.
But in the code from the lesson the one section im not quite following is as follows:
In the "objCommand.Parameters.Add" im passing the parimeter "@ProjectID" and its of type "OleDbType.Guid" to a maximum size of 16--- Is that right so far?
then
New Guid(ComboBox1.SelectedValue.ToString), what the "New Guid" is im not sure?
Any help is appreciated.
Thanks again
Just covered a few chapters in my Wrox book on ADO.net.
Its all going just swell .........but Im not following one section to well.
Im sending Parimeter & Non Parimeter Queries to my database...
One of the database fields has an ID column and has a GUID as its value, in a lesson I covered I made a small application that generates a new GUID for me and when I need to add a record to the database I can paste it in.....No probs all works fine.
But in the code from the lesson the one section im not quite following is as follows:
In the "objCommand.Parameters.Add" im passing the parimeter "@ProjectID" and its of type "OleDbType.Guid" to a maximum size of 16--- Is that right so far?
then
New Guid(ComboBox1.SelectedValue.ToString), what the "New Guid" is im not sure?
Any help is appreciated.
Thanks again
Code:
'Add the required parameter for the query
objCommand.Parameters.Add("@ProjectID", OleDbType.Guid, 16).Value = _
New Guid(ComboBox1.SelectedValue.ToString)