How to transfer a GUID created using vb.net into a SQL database using a stored procedure

I am able to create a guid using:

Public Function GetGUID() As String
' Returns a new GUID
Return System.Guid.NewGuid.ToString
End Function
however when I try to add this to a parameter using the following:
Me.cmdSpAddOptions.Parameters("@QuoteDetailID").Value = GetGUID()
I get an error, I have also tried this:
Dim uidQuoteDetail As String = GetGUID()
Dim myuid = New System.Guid(uidQuoteDetail)
Me.cmdSpAddOptions.Parameters("@QuoteDetailID").Value = myuid
but get the error "Object must implement IConvertible"
Any sugestions????
0
gladstone
12/10/2003 7:21:48 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

3 Replies
1073 Views

Similar Articles

[PageSpeed] 36

this is my stored procedure:

CREATE PROCEDURE AddHomeOptions
@DeletionStateCode int, @Quantity decimal, @PricePerUnit money, @ExtendedAmount money, @Description nvarchar, @QuoteDetailID uniqueidentifier
AS
begin
INSERT INTO QuoteDetailBase
(DeletionStateCode, Quantity, PricePerUnit, ExtendedAmount, CFSDescription, QuoteDetailID)
VALUES (@DeletionStateCode, @Quantity, @PricePerUnit, @ExtendedAmount, @Description, @QuoteDetailID)
end
GO
0
gladstone
12/10/2003 7:56:24 PM
The first example should work.  What is the error you got ?


Richard Pineault
0
Tavarich
12/10/2003 8:56:09 PM
Invalid cast from System.String to System.Guid.
0
gladstone
12/10/2003 9:43:08 PM
Reply:

Similar Artilces:

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

saving .net DateTime to sql database using Stored Procedure...
Hello, I've read many posts on this, but not found any real answers. I have a web method that accepts a DateTime parameter, then writes this value back to a SQL database table.  Sql data type is "datetime" and the column accepts nulls. When the web service is called I get an error, "SqlTypeException: SqlDateTime overflow" or another error of similiar results.When I removed the database call and just write to a label or variable on the page, the web method works fine, but when it saves to the database, the error is thrown. Any ideas on how to handle...

Using sql Stored procedure from vb.net to output data
Can using a stored procedure from vb.net I get a report converted to xml for printing purposes.....ANy coding samples...

Problem with Oracle Stored Procedures using ODP.NET in VB.NET (VS 2003)
This is the stored procedure,Procedure RetrieveReservations(pProperty In Varchar2,pResHeaderId In Varchar2,pEmail In Varchar2,pPasswd In Varchar2,ResultSet In Out ResCursor);This is the old .asp code (part of it)objConn.ConnectionString = Application("BackEndConnection_ConnectionString")objConn.Open objComm.ActiveConnection = objConn objComm.CommandText = "internet_package.RetrieveReservations"objComm.CommandType = adCmdStoredProc objComm.Parameters.Append objComm.CreateParameter("pProperty", adVarChar , adParamInput, 8, Request.QueryString("propid"))objComm.Parameters.Append objComm.Crea...

Problem accessing SQL Stored Procedure From .Net using hibernate object
Hi, I am calling a SQL Stored procedure from .net application using Hibernate object, but somehow its telling me "The 'callable' attribute is not declared.", I am not sure what's wrong I have done here. Will really appreciate if someone can help me for this. Herewith I am providing my Stored Procedure, my .hbm file and code to call it. can someone pls tell me what's wrong in this? Also, if possible, pls tell me how to set result in a list object. Thanks in advance, ######################################### MY STORED PROCEDURE : ALTER PROCEDURE [dbo].[RulesDetails_...

How to Retrive the store procedure return value in Ado.Net by using Dot Net?
Hi i am thiru. i try to create the small search engine. so that i have wrote the store procedure for it. thats given below.Create procedure FindtestThree @Name varchar(25), @Location varchar(25), @EmpId varchar(25) as select * from TbInfo where Name like + '%' + @Name + '%' select * from TbInfo where Location like + '%' + @Location + '%' select * from hi where ComName like + '%' + @EmpId + '%' Exec FindtestThree 'aa','a','d' ----------------------------------------- The above procedure return t...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

Delete rows in SQL database using vb.net
Pls help: I have two tables: Tb and seller In the seller table: these are the following fields:ContactNo,StudentName,AdminNo,Serialcode In the tb table : these are the fields : Title, Author, Serialcode ***Each Title has its own unique Serialcode I wish to delete ContactNo, StudentName, AdminNo, Serialcode when i choose the particular Title. I not sure of the coding to delete rows....Pls help Coding: Dim objConnection As New SqlConnection(strConnection) Dim strSQL As String = "DELETE Seller.AminNo, Seller.ContactNo, Seller.StudentName, Seller.Serialcode FROM Sel...

Storing Excel File in SQL DataBase Using .NET
Please any one tell me how to Store excel sheet in DataBase using our .NET Thanks in ADVANCE Try this article by Steve Orr:http://steveorr.net/articles/EasyUploads.aspxDarrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you!...

How do you enter Stored Procedures in VB.NET (Using Access DB)??
I'm using Microsoft Access 2003 and I'm using VB.Net. I'm trying to save a Stored Procedure for the application but when I enter the code into the SQL view of MS Access Query area it throws back errors. The Stored Procedure I'm trying to use is as follows:CREATE PROCEDURE dbo.CheckPassword(  @username Varchar(20)  @password Varchar(20))ASIf Exists(  Select User_ID from UserList Where User_Username = @username And User_Password = @password)Return 0 You must run the SQL command over oledb. You dont.  Microsoft Access Does not support Stored Procedures.  Yo...

how to create crystal report using VB.NET with the database of ACCESS
hi..! i want to create crystal report of my project.em using access database...!   but i have no idea how to create reports using VB.NET with the access db  i create the report but it shows only one record  hi ......You can do it PUSH method of creating crystal reports...!!!!! In push method Typed Dataset is used as the data sourcefor crystal report...!!!Steps for creating the report could be.....1. add a typed dataset to your solution.2.go to server explorer.3.connect your access file to your server explorer. 4.Change data base.. 5.attach access file..!!6.test ...

retrieve selected data from SQL database using vb.net
I already watch the video in the vb.net express to learn about the data binding. But the problem that i face is when i want to retrieve certain data from the database. the video just show how to fill and update. who ever know the code to retrieve the selected row from the SQL database using vb.net 2005????? thanks do u want to retrive a particular cell or a particular row from the database?what control do you want to bind the retrived value to? thanks Imran NathaniLet the game begin!!Barcode image generation made easy.Writing an ActiveX Control in C#Generating Relational Data From XML D...

Using ADO.NET Execute Second Stored Procedure Depending of Output of First Stored Procedure
When a user logs onto the app, I capture their UserId, today's date and thier WINNT using ADO.NET calling a stored procedue-no problem. Now, once the above mention fields have been populated, when the same user logs on again and this time click their daily attendance time, I need to execute and update stored procedure-no problem. Each time the user logs onto the attendance page, they need to be able to view the previuos time stamps, on page load.- no problem The problem is that I cannot get all three to work in concert, although they will work independently, somewhat. Sotred proc...

Web resources about - How to transfer a GUID created using vb.net into a SQL database using a stored procedure - asp.net.object-datasource

Invasiveness of surgical procedures - Wikipedia, the free encyclopedia
There are three main categories which describe the invasiveness of surgical procedures . These are: non-invasive procedures , minimally invasive ...

Procedure is more a snap than a snip
A QUEENSLAND doctor is bidding to set an unusual world record by performing the highest number of vasectomies in one day, with the help of fellow ...

Will Paul Ryan Make His Mark As Speaker By Instituting Impeachment Procedures Against President Obama ...
Wisconsin Ayn Rand devotee Paul Ryan just started his new job as Speaker of the dysfunctional House Republicans. And he's already headed for ...

Are patients charged drastically different prices for the same medical procedure? - Videos - CBS News ...
Patients are often charged drastically different prices for the same medical procedures and research may link later bedtimes with gaining weight. ...

Vin Scully To Miss Dodgers Postseason After Medical Procedure
... , who has been calling Dodgers games since the Truman administration, will miss the team’s playoff run as he recovers from a medical procedure. ...

FDA finds flaws in Theranos' nanotainers and quality control procedures
... to Theranos' blood testing technology comes from the US Food and Drug Administration, which found flaws in the company's quality control procedures. ...

'Daily Show' Host Trevor Noah Hospitalized for Emergency Procedure
'Daily Show' Host Trevor Noah Hospitalized for Emergency Procedure

Hall Of Fame Broadcaster Vin Scully Has Medical Procedure, Will Miss All Of 2015 Postseason
While the Dodgers will be in the 2015 MLB postseason, their Hall of Fame broadcaster, won't. Here's details on Vin Scully.

US AIRPORT SECURITY CONCERNS DHS to heighten procedures in light of Russian jet bombing theory, poor ...
US AIRPORT SECURITY CONCERNS DHS to heighten procedures in light of Russian jet bombing theory, poor test performances by TSA screeners

Concession: Ryan promises Freedom Caucus he’ll delay discussion of reforming procedure for removing the ...
Compromise. Like I said this morning, it sounds like they did a little horse-trading at their summit. Ryan wants them to give up their right ...

Resources last updated: 11/24/2015 11:44:42 PM