473,465 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

REPOST: Visual Studio 2003 Issue - Error when defining TableMappings on DataAdapter

Reposting after about 2 weeks of no response ... thanks if you can help...

----------------------------------------------------------------------------
--------------

To anyone who thinks they know it all: ;)

We recently upgraded our MSDN Version of VS.NET 2002 to VS.NET 2003...
Things are all working well, except we've run across a new bug or issue
since our adopting of the new package.

Before I give the error message, let me preface it with a brief description
of how our 1-tierd data environment is setup. (Note: we do get the same
errors on multi-tiered apps as well and originally it was thought that our
error lied in the way we were having our dataaccess objects inherit
connections from base objects... but anyway ... ).

In a typical web application of ours, we have an appsetting called
"MainDBConnection" within the Web.Config file. The data w/in the variable
looks something like this:

<add key="MainDBConnection" value="data source=OurServerName;initial
catalog=OurDB;persist security info=False;user
id=mikej;password=mypassword;workstation id=MIKEJ;packet size=4096" />

The connectionString was one that was actually generated by VS.NET and then
copied/pasted into here. Anyway, in the designer, and connection that is
defined points to the value through the Dynamic Properties -->
ConnectionString area of the Properties Window... Everything looks good...
it retrieves the value from the Web.Config and any command object works
nicely w/ it... nicely meaning that I can define queries in the designer and
VS.NET can communicate w/ the DB for parameter generation and all that
jazz...

Here's where the problem comes in... Ok... so imagine I've defined a
connection object (pointing to my config data), a command object (pointing
to the connection) and a dataAdapter (using the command object as its
SelectCommmand Property) ... When I click on the button to define
TableMappings in my property window for the dataAdapter I get the following
error:

Unable to retrieve the schema from the database table. Source column
mapping information will not be available. Would you like to continue?

What!?!? This is where I'm confused... VS.NET can access the DB when I'm
defining my Select Command's CommandText property. Why can't it when I'm
defining my tableMappings? Another thing that confuses me is that
everything worked fine in the previous version of VS.NET... Bug addition? ;)
It's probably some bad convention I'm using in setting up a dynamic
connection, but if anyone has a way for this to work, pleeeeeeeease let me
know. I have figured out some workarounds for the issue, but it's such a
productivity killer to get it going again...

While I'm on the subject, I'll describe how I get around it. There are 2
ways I have taken care of this:

1. Add this to the dataadapter in the object constructor (This still doesn't
fix it working in the designer, but allows me to compile):
- MyDataAdapter.TableMappings.Add("Table", "MyNewTable")

2. If I really, really want my designer to work right, I can tinker around
w/ Visual Studio enough so that it prompts me for my SQLServer Username and
password (and I guess VS saves that info in memory 'til I close it)... after
that, the Designer's table mappings work again. How do you get that
user/password prompt you ask? I usually have to define a new connection for
the DB and then change it back after it has prompted me. This way works the
best, but is still just a big pain in the butt because everytime I *open* a
page in the designer it clears out my table mappings until I fix the
problem... again and again

Also, one thing that has already been suggested and tried is changing the
'persist security info=False' to True, but that didn't work either :)

Thanks for your time,

Mike Joseph
Hypersite.net

Nov 22 '05 #1
0 701

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

Similar topics

6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: Dotnetified | last post by:
Reposting after about 2 weeks of no response ... thanks if you can help... ---------------------------------------------------------------------------- -------------- To anyone who thinks they...
0
by: Gregor Valentin | last post by:
Hi! one Question. Is here anybody who had success in accessing a mySQL database via the ODBCDataAdapter in the Visual Studio design view? I get always Errors after creating the select...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
0
by: Bruno Jouhier [MVP] | last post by:
Last september, I posted a message about abnormal compilation times in Visual Studio .NET. I got some help from a nice guy from Sweden, who had the same problem and saw my post on the newsgroup....
1
by: Cowboy \(Gregory A. Beamer\) | last post by:
I found an error in the Data Access application, specifically in the tableMappings in the FillDataSet() overload with the following signature: private static void FillDataset(SqlConnection...
67
by: Scott M. | last post by:
Can anyone give me any ideas on why VS.NET 2003 running on XP Pro. (P4's with 1GB RAM) would take over 3 minutes to simply create a new ASP.NET Web Application on http://localhost? It seems that...
2
by: Jason Huang | last post by:
Hi, I am wondering why use the DataTableMapping in SqlDataAdapter when Updating data. Would someone give me some advice? Thanks for help. Jason
0
by: google | last post by:
Hi, after fighting with an issue in Visual Studio.NET 2003 in aspx, I've finally figured out what it is and maybe you might find it usefull. Symptoms: When you try to open a .aspx or...
6
by: JonSteng | last post by:
..Net Visual Studio Professional 2003 Version 7.1.3088 ..Net Framework 1.1 SP1 Version 1.1.4322 IIS 5.1 Windows XP Professional SP2 Micron T3000 Laptop (1.5 GHz; 1GB RAM; 40GB HD with 17GB Free)...
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
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.