473,379 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

table adapters

Hi im using 2005/asp.net 2.0

I have added a query on one of my table adapters
getDataByIssueID( @IssueID )

....... sql query

select * from issues where (IssueID = @IssueID) or (@IssueID IS NULL)

The problem is that the function as declared by the designer has not used a
Nullable type.

How can I get around this ?

Cheers
Jun 27 '08 #1
3 1350
On Jun 18, 6:27 pm, "Microsoft Newsserver" <m...@nowhere.comwrote:
Hi im using 2005/asp.net 2.0

I have added a query on one of my table adapters

getDataByIssueID( @IssueID )

...... sql query

select * from issues where (IssueID = @IssueID) or (@IssueID IS NULL)

The problem is that the function as declared by the designer has not used a
Nullable type.

How can I get around this ?

Cheers
Hi...

Can u be a tittle more descriptive about the problem

Thanks

Munna
Jun 27 '08 #2
Well, the designer code generates the function to return the datatable. The
signature has parameter of type
System.Int32. However, the underlying SQL Statement has the parameter as

(IssueID = @IssueID) or (@IssueID IS NULL)

Which means it needs to be able to take a nullable type. Therefore, how else
can I use the function with a Null value.



"Munna" <mu******@gmail.comwrote in message
news:1e**********************************@e53g2000 hsa.googlegroups.com...
On Jun 18, 6:27 pm, "Microsoft Newsserver" <m...@nowhere.comwrote:
>Hi im using 2005/asp.net 2.0

I have added a query on one of my table adapters

getDataByIssueID( @IssueID )

...... sql query

select * from issues where >>
The problem is that the function as declared by the designer has not used
a
Nullable type.

How can I get around this ?

Cheers

Hi...

Can u be a tittle more descriptive about the problem

Thanks

Munna


Jun 27 '08 #3
Dont worry, I solved it.

The basic problem was that the parameter takes the position of being not
nullable because the column was an ID non nullable field. I explictly
changed the parameter for the query and it was fine. Not sure if that would
revert back if reconfigured though ...


"Microsoft Newsserver" <me@nowhere.comwrote in message
news:uf****************@TK2MSFTNGP02.phx.gbl...
Well, the designer code generates the function to return the datatable.
The signature has parameter of type
System.Int32. However, the underlying SQL Statement has the parameter as

(IssueID = @IssueID) or (@IssueID IS NULL)

Which means it needs to be able to take a nullable type. Therefore, how
else can I use the function with a Null value.



"Munna" <mu******@gmail.comwrote in message
news:1e**********************************@e53g2000 hsa.googlegroups.com...
>On Jun 18, 6:27 pm, "Microsoft Newsserver" <m...@nowhere.comwrote:
>>Hi im using 2005/asp.net 2.0

I have added a query on one of my table adapters

getDataByIssueID( @IssueID )

...... sql query

select * from issues where >>
The problem is that the function as declared by the designer has not
used a
Nullable type.

How can I get around this ?

Cheers

Hi...

Can u be a tittle more descriptive about the problem

Thanks

Munna



Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bennett Haselton | last post by:
It seems whenever I add a new field to a database table that's queried by DataAdapters in my project, I get run-time errors because I don't go back and re-generate all the DataAdapters to read the...
0
by: Bruce HS | last post by:
I'd like my VB2005 code to be able to pass my WinForm Table Adapter to an ancestor object for processing (for instance doing generic logic about saving). However, it looks like Table Adapters...
1
by: Bruce HS | last post by:
I'm using VS2005, VB, WinForms I’ve developed forms using those nice wizards Microsoft provides. However, I’m running into a couple of complications trying to work with the resulting Table...
0
by: billy.murray | last post by:
I have a system which comprises 4 servers (1 server per plant area). Each plant area server has 2 databases (Config<nand Runtime<nwhere <nis the plant area number) and 1 web application which uses...
2
by: =?Utf-8?B?SmFtZXNJRURPVE5FVA==?= | last post by:
I have an application (ASP.NET 2.0/SQL Server 2005) which makes heavy use of table adapters for pulling records from SQL. Under heavy load, we get a lot of SQL Server Timeout errors. We have run a...
2
by: Simon | last post by:
Hi all, Is it somehow possible to do do batched updates with table adapters in the same way you can with data adapters? I expected the methods to be much the same but apparently not. If it...
12
by: Randy | last post by:
Hi, Trying to pass along a table row delete to the datasource, but I'm crashing. Here is the code: Private Sub btnDeleteIngr_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
0
by: gilbes | last post by:
I have been searching for a solution to this for a while now and everything I have found has lead me down the wrong path. Any assistance you guys could give would be much appreciated. I would...
4
by: dgk | last post by:
Should I dispose of table adapters and data tables and rows or do they garbage collect themselves?
4
by: =?Utf-8?B?TWFydGlu?= | last post by:
In Device Manager under Network Adapters, nearly all (about 20) items have a yellow warning symbol. The first item, Microsoft 6to4 Adapter says driver is up-to-date BUT says "This device is not...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.