473,794 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2314
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 *programmatical ly* 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 *programmatical ly* 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
InitConnecti on 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
functionalit y.

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
4268
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 web.config. From the MSDN documentation it seems like it's possible to override settings with values in a config file for winform applications. Is the same possible for web applications. I have tried to add a connectionstring (under the...
7
1390
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 themselves can be shared across layers. I find it inconceivable that this suggestion http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=d2907b53-885b-4d24-bc9c-1a04d76036e4 (that's not me who suggested it) has been marked...
1
2068
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 the float columns then an exception is thrown: Line 2136: try { Line 2137: return
4
2523
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 gridview1.datasource = t.getdata() gridview1.databind() Now I create new query in the TableAdapters dataset
6
2487
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 the report on the browser I get a logon page even though my dataset has a connection string saved within it. When I preview the data in the dataset I see it no problem. however the report doesn't seem to know that the dataset is there or that the
7
2494
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 this TableAdapter work in the same manner as a SQL Server Stored Procedure or View? Or, does it work like MS Access where it pulls all the data over and then filters it? Or, should I be making my data sources for the TableAdapters stored...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.