Groups | Blog | Home
all groups > visual studio .net general > may 2007 >

visual studio .net general : I'm trying to import a Database Schema from an SQL Server 2000 Dat


SHEBERT
5/25/2007 1:19:01 PM
I'm trying to import a database schema in my Database project in VS2005 and
I got:

Error: Import Database Schema error: Invalid length parameter passed to the
substring function.

The importing of database schema was cancelled.

It,s the first time I'm trying to get the database schema in the vs2005
v-wywang NO[at]SPAM online.microsoft.com
5/28/2007 12:00:00 AM
Dear SHEBERT,

Error: Import Database Schema error: Invalid length parameter passed to the
substring function.
This is an exception thrown by SQL server.

Accoding to your description, this is the first time for you to get the
database schema in the vs2005
database project. You may check the following document. Please make sure
you do the same steps as the document mentioned.

a) You can import a database to an empty database project.
http://msdn2.microsoft.com/en-us/library/aa833177(VS.80).aspx
[How to: Import a Database Schema ]

b) You can import a database when creating database project.
http://msdn2.microsoft.com/en-us/library/aa833235(VS.80).aspx
[How to: Create Database Project]

If the issue still persists, even through you follow the steps as the
document.
In order to narrow down the issue, could you please provide some further
information?
1. Have you installed the latest sp (sp4) on your SQL 2000?
2. Have you installed the latest sp (sp1) on your VS 2005?
3. Have you tested with other database (such as the sample database
NORTHWIND)? Did you meet the same issue? If false, I think the issue is
related to your special database.

Is it possible for you to packet your database and send it to me? Thus we
can reproduce the issue on my side and perform the further analyze.
My aliasis v-wywang@microsoft.com.

http://technet.microsoft.com/en-us/sqlserver/bb331729.aspx
[SQL Server 2000 Downloads]
http://msdn2.microsoft.com/en-us/vstudio/bb265237.aspx
[Visual Studio 2005 Service Pack 1 (SP1)]

Hope this helps.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
v-wywang NO[at]SPAM online.microsoft.com
5/30/2007 12:00:00 AM
Hello SHEBERT,

This is Wen Yuan again. I haven't heard from you a couple of days. Have you
resolved the issue so far?
If the issue still persists, please feel free to let me know and I'm glad
to assist 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.
v-wywang NO[at]SPAM online.microsoft.com
5/30/2007 12:00:00 AM
Hello SHEBERT,

This is Wen Yuan again. I haven't heard from you a couple of days. Have you
resolved the issue so far?
If the issue still persists, please feel free to let me know and I'm glad
to assist 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.
SHEBERT
5/30/2007 7:22:02 AM
HI, sorry for the delay,

I'm not with SQL Serveur 2000 SP4 but SP3a, I'm trying to have our dba
install SP4 one a server so I can test If it will work with that service pack.

I have VS2005 SP1

But I cannot test with NORTHWIND since we do not have any DB with NORTHWIND
installed.

I'll come back to you as soon as I have tested with SP4 on a SQL Server
2000. Do you know for a fact that SP4 is required to import a database schema
?


[quoted text, click to view]
v-wywang NO[at]SPAM online.microsoft.com
5/31/2007 12:00:00 AM
Dear SHEBERT,
Thanks for your reply.

For the issue related to SQL or VS, we would like to suggest customer to
install the later Service packs. Each SQL 2000 server in our side has been
installed sp4. I test the steps on my side and it works fine. Thus I
suggest you may also install sp4. After that, we have the same the
scenario. This helps on further research very much. If you have any concern
on this, please feel free to let me know.

I guess the issue is related to special Database. However, it seems like
you didn't install sample databases on your product machine. If sp4 doesn't
help for the current issue, would you please open SQL profile and then
v-wywang NO[at]SPAM online.microsoft.com
6/5/2007 12:00:00 AM
Dear SHEBERT,

This is Wen Yuan again. Does SQL 2000 SP4 help on this issue?
I haven't heard from you a couple of days. I'm sorry it seems my former
reply has been truncated in newsgroup. I just want to say if the issue
still persists, could you please use SQL profile to trace log between VS
2005 and SQL server 2000? This will helps on the research.
1. Open your SQL profile
2. Create a new trace and start tracing
3. Open your VS 2005
4. Reproduce the issue.
5. Stop tracing in SQL profile.
6. Save and send me the trace log.
My alias is v-wywang@microsoft.com

Please feel free to let me know if you have anything unclear. I'm glad to
assist you.
Have a nice day,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
v-wywang NO[at]SPAM online.microsoft.com
6/7/2007 12:00:00 AM
Hello SHEBERT,

How are you? This is Wen Yuan, I Just want to check if the issue has been
resolved?
If it still persists, please don't hesitate to update here. I'm glad to
work with you.
We'll go on to assist you on it.

Have a great day, thanks.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
SHEBERT
6/21/2007 7:27:03 AM
Hi, We update our SQL 2000 to SP4 and the problem is still happening.

I still get the "Invalid length parameter ..." error.



[quoted text, click to view]
v-wywang NO[at]SPAM online.microsoft.com
6/22/2007 12:00:00 AM
Hi Shebert,
Thanks for your reply.

I'm sorry to hear SQL 2000 sp4 doesn't help. It must be time-consuming for
you...
However, I still cannot repro the error, even though I have tried again and
again. I would suspect the issue to your special database.

For such case, it is necessary for me to reproduce the issue on my side.
Is it possible for you to packet your database and send it to me? Thus, I
could perform further anyliaze.

If you have some private data and cannot send it for me, could you please
use SQL profile to trace log between VS 2005 and SQL server 2000? Thus, I
could review it and try to figure out the root cause.
1. Open your SQL profile
2. Create a new trace and start tracing
3. Open your VS 2005
4. Reproduce the issue.
5. Stop tracing in SQL profile.
6. Save and send me the trace log.
My alias is v-wywang@microsoft.com

I'm looking forward to your reply and glad to assist you.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
v-wywang NO[at]SPAM online.microsoft.com
6/26/2007 12:00:00 AM
Hi Shebert,

This Wen Yuan. I haven't heard from you about two days. Have you resolved
the issue so far?
If it still persists, would you please collect trace log or your database
for me. Thus, I could do further analyse. I'm looking forward to your reply
and glad to assist you. Thanks.

Have a great day,
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jason Rodman
7/15/2007 11:34:00 AM
I am having this very same issue. I am running VS 2005 Team Suite with the DB
Developer addon against a 2005 database running SP2. I just loaded SP1 CTP
for DB Developer and it didnt fix the problem. I even installed SP2 for my
local sql express installation and that didnt fix it either.

The database in question was orginally a 2000 database that has been
upgraded to 2005. I get this error even if I delete everything from the
database (all tables, procs, views, etc). Is it something in the setup of my
database? I even get this using the schema compare function. The only way I
could import my database was to script it and import the script. Now that
wont even work because it wont build (gives me the same error in the build
AddThis Social Bookmark Button