DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 18 Jul 2007 11:50:06 -0400,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    Max2006 am
          2    (WenYuan Wang [MSFT])
          3    (WenYuan Wang [MSFT])
                 4    Max2006 am
                        5    (WenYuan Wang [MSFT])


Strongly Typed DataSet -> Preview Data -> How to preview stored procedures with GUID parameter?   
Hi,

In Strongly typed datasets, when we preview a table adapter query, we cannot 
preview a stored procedure query that has GUID parameter.

The error complains that cannot convert a string to GUID.

What is the proper format for GUID parameters? Of course I tried {.} format.

Thanks,
Max
Date:Wed, 18 Jul 2007 11:50:06 -0400   Author:  

RE: Strongly Typed DataSet -> Preview Data -> How to preview stored procedures with GUID parameter?   
Hello Max,

For Strongly Typed Dataset, the DBDataAdapter has been wrapped by 
TableAdapter class which generated by VS 2005 IDE. I assume the typed 
dataset created by VS 2005. Please correct me if I misunderstand.

TableAdapter will define all the parameter for DBCommand which used for 
executing Stored Procedure.
The type of each parameter in DBCommand should be the same the type as it 
in Stored Procedure.
Otherwise, the error message will show up when we preview/execute the 
DBCommand.
For OleDB, the type is System.Data.OleDb.OleDbType.Guid.
this._adapter.UpdateCommand.Parameters.Add(new 
System.Data.OleDb.OleDbParameter("GID", System.Data.OleDb.OleDbType.Guid, 
0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), " GID", 
System.Data.DataRowVersion.Current, false, null));

For SQL Database, the type is System.Data.SqlDbType.UniqueIdentifier.

I guess the parameter has been defined as the wrong type.

In order to resolve the issue, we need more detailed information. Would you 
please clarify the following question for me? Thanks.
1)	Which Database is your application connects to? (SQL database or Access 
file?)
2)	What is the Store Procedure in the underlying database? (Could you paste 
the source code of Store Procedure here? This will be helpful very much)
3)	Does the typed Dataset's generated by VS 2005 IDE? If true, would you 
please send me the DataSet.Designer.cs file? I will review on this. If 
Typed Dataset created by yourself, would you please paste the code about 
the DBCommand and each DBCommand's Parameter.
My alias is v-wywang@microsoft.com. I'm looking forward to your reply.

Have a great day.
Sincerely,
Wen Yuan
Microsoft Online Community Support 
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Thu, 19 Jul 2007 06:58:49 GMT   Author:  

RE: Strongly Typed DataSet -> Preview Data -> How to preview stored procedures with GUID parameter?   
Hello Max,

This is Wen Yuan. I just want to check if you have resolved the issue so 
far?
If it still persists, would you please collect some detailed information as 
my former post and update here again? We will perform more research on 
this. I'm glad to work with you.

Have a great day,
Sincerely,
Wen Yuan
Microsoft Online Community Support 
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 23 Jul 2007 10:50:44 GMT   Author:  

Re: Strongly Typed DataSet -> Preview Data -> How to preview stored procedures with GUID parameter?   
Hi Wen,

Thanks for follwo-up. My question was realted to visual studio dataset 
designer UI. When you preview a stored procedure, the VS.NET UI does not 
allow you to enter a GUID value.

Regards,
Max



"WenYuan Wang [MSFT]"  wrote in message 
news:NwYPcdRzHHA.6140@TK2MSFTNGHUB02.phx.gbl...

> Hello Max,
>
> This is Wen Yuan. I just want to check if you have resolved the issue so
> far?
> If it still persists, would you please collect some detailed information 
> as
> my former post and update here again? We will perform more research on
> this. I'm glad to work with you.
>
> Have a great day,
> Sincerely,
> Wen Yuan
> Microsoft Online Community Support
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no 
> rights.
> 
Date:Thu, 26 Jul 2007 11:15:02 -0400   Author:  

Re: Strongly Typed DataSet -> Preview Data -> How to preview stored procedures with GUID parameter?   
Hello Max,
Thanks for your reply.

I'm sorry to say this is VS 2005 IDE product issue.

I have repro the issue today. The issue occurs in VS.net 2005 DataSet 
Desiginer UI. However, at runtime when I pass a Guid to the table adapter, 
it works fine.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedba
ckID=237974
[Preview Data Dialog does not accept GUIDs]
Young (Program Manager) confirmed this issue. It seems they will reconsider 
this issue when planning for the future releases. (After Orcas)

We are indeed sorry for any inconvenience this may have caused.
Best regards, 
Wen Yuan
Microsoft Online Community Support  
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Fri, 27 Jul 2007 08:14:18 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us