473,385 Members | 1,732 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,385 software developers and data experts.

TableAdapters Created in Dataset (XSD) Issues

Hi,
I've been trying to work with the XSDs and ran into a few road blocks.

1. Stored procedures that uses temp tables, i.e. #TempTable. The
wizard complains that #TempTable is an invalid object. What gives?

2. How do you programatically change the connection string at runtime
when using these TableAdapters via databinding in the IDE GUI?

Thanks,
Nick Hustak
Jun 25 '06 #1
2 2292
Nick,

Is the stored procedure creating the temp table itself, as opposed to
using a temp table that is created on the same connection by another
procedure?

Also, the connection string handling within 2005 for datasets (XSD) is
pretty weak in my opinion. If you're using the dataset within your
application, then it can use the application or web config file to
store the string. But if you're using a common dataset in a class
library then it uses the connection string from the sql server you have
registered in your IDE and stores it *programmatically* within the
settings designer code. It's because it is a class library and so will
use the configuration from the parent application.

The only way that I know of to override this is to change the
InitConnection method within the dataset designer code to use the
application config connection string from the parent application. This
works, but the obvious problem is that if you then need to change
anything with the adapter from the designer, it will overwrite this
code.

So I guess what you (and I) have to do is wait until right before the
application is to be deployed, and change the InitConnection methods to
use the configuration file settings. This, in my opinion, is not an
acceptable solution, but I'm not sure how else they could implement the
functionality.

Thanks,
Gary

Jun 27 '06 #2
On 27 Jun 2006 06:42:41 -0700, "Gary" <gg********@neo.rr.com> wrote:
Nick,

Is the stored procedure creating the temp table itself, as opposed to
using a temp table that is created on the same connection by another
procedure?

Also, the connection string handling within 2005 for datasets (XSD) is
pretty weak in my opinion. If you're using the dataset within your
application, then it can use the application or web config file to
store the string. But if you're using a common dataset in a class
library then it uses the connection string from the sql server you have
registered in your IDE and stores it *programmatically* within the
settings designer code. It's because it is a class library and so will
use the configuration from the parent application.

The only way that I know of to override this is to change the
InitConnection method within the dataset designer code to use the
application config connection string from the parent application. This
works, but the obvious problem is that if you then need to change
anything with the adapter from the designer, it will overwrite this
code.

So I guess what you (and I) have to do is wait until right before the
application is to be deployed, and change the InitConnection methods to
use the configuration file settings. This, in my opinion, is not an
acceptable solution, but I'm not sure how else they could implement the
functionality.

Thanks,
Gary


Gary,
First, thanks for a well 'typed (spoken)' reply. My stored procs use
temp tables for intermediate calcs and things ala CREATE TABLE
#Temp...

I've since seen from another thread that MS KNOWS about this and did
nothing about it. It would appear you can still use the proc in a
dataset, but forget getting a schema in the IDE GUI - it won't read
it. Kind of silly IMHO.

And unfortunately you have confirmed my fear - they let this out the
door without serious consideration for how it works. Why in the world
they would not provide an easy way to override the connection strings
to datasets is beyond me. Wow they dropped the ball on the designer
- I'm a bit suprised seeing as they grabbed Anders from Delphi, which
has excellent designer support for databases work.

Oh well - thanks for the detailed explanation. I really am not happy
with having to remember to swap around the init string in the web
config. I toyed around with trying to manipulate it on the fly, but
it would seem it's completely locked out from programmatic
modification. That would have solved a lot of these issues.

I wonder if DLINQ is going to have the same silly issues. So
close..but these are damn near brick walls. I have zero urge to hand
code all my table objects - such a waste of time.

Thanks again,
Nick
Jun 27 '06 #3

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

Similar topics

3
by: Christopher Kimbell | last post by:
I have a class library that contains a number of TableAdapters and I'm using this from a web application. Is there a way of getting the TableAdapters to use the connectionstrings defined in...
7
by: CMM | last post by:
Unless someone has come up with a way, I still don't understand how you can use TableAdapters in a true n-tier infrastructure.... where the DataAccessLayer is in one Dll and *only* the Datasets...
1
by: Nick Gilbert | last post by:
Hi, I have a database table which has some "float" columns which allow nulls. I have created a TableAdapter to view this table. If I open the TableAdapter and there are null values for some of...
4
by: Ted Ngo | last post by:
I create a northwind Strongly Typed TableAdapters dataset, the create a query like "select a, b, c, d from employeetable" then bind it into the gridview dim t as new northwindTableAdapters...
6
by: Simone | last post by:
Hello Here is my issue, I created a crystal report using a data set from my xsd. Then I created a page with the crystal report viewer control and bound the report to it. When I try to view...
7
by: =?Utf-8?B?R3JlZw==?= | last post by:
When using the VS Wizards to create a DataSet I select tables. Then, I use the TableAdapter Configuration Wizard to modify the underlying queries that retreive the data. What I'm wonder is, does...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.