Showing posts with label quot. Show all posts
Showing posts with label quot. Show all posts

Tuesday, March 20, 2012

"Who's the idiot that designed the file destination? "

Hi everybody,

I'm new -- sorry, I couldn't figure out how to reply to this thread, I think because it's locked- so I started a continuation.

What I am wondering about is if you indicate "text qualified= true" then why does it still get confused by embedded commas in quote-delimited text; I would think that the "text qualified" parameter would take care of that. Can anyone explain?

So as a work around I am thinking of running a perl script via "Execute Process Task" and clean up the commas that way, since I have little control over how it is produced.. the app it comes from has no ability to contol output, and it outputs it's tables as comma seperated files, with text fields surrounded by quotes. I was hoping to stay inside SIIS for the whole etl job-- must admit some disappointment.

Any suggestions would be greatly appreciated!!

Thanks!!

jk

At the outset, I wonder if you went to the school when you were a child.|||

enric vives wrote:

At the outset, I wonder if you went to the school when you were a child.

Enric,

If you're referring to the title of the thread, that was the name of the original thread. So its not this guy's fault.

-Jamie

|||

jk-olap wrote:

Hi everybody,

I'm new -- sorry, I couldn't figure out how to reply to this thread, I think because it's locked- so I started a continuation.

What I am wondering about is if you indicate "text qualified= true" then why does it still get confused by embedded commas in quote-delimited text; I would think that the "text qualified" parameter would take care of that. Can anyone explain?

So as a work around I am thinking of running a perl script via "Execute Process Task" and clean up the commas that way, since I have little control over how it is produced.. the app it comes from has no ability to contol output, and it outputs it's tables as comma seperated files, with text fields surrounded by quotes. I was hoping to stay inside SIIS for the whole etl job-- must admit some disappointment.

Any suggestions would be greatly appreciated!!

Thanks!!

jk

Hi jk,

Could you post a sample that exhibits the problem?

Thanks

Jamie

"What's New and Enhanced in Transact-SQL (Transact-SQL)"

The "What's New and Enhanced in Transact-SQL (Transact-SQL)" link from "What's New (SQL Server 'Katmai')" takes me to a "Topic Not Found" page. Is this simply one of the as-yet blank placeholders, or is my copy of BOL borked? Gotta make sure I'm not missing out on any cool info.

Hi David,

No, your copy of BOL is not borked. The What's New (Transact-SQL) topic didn't make it in this release and we spotted this broken link too late to fix it for this release. The good news is that all the relevant T-SQL features are covered in the What's New (Database Engine) topic.

Thanks,

Gail

|||Cool. Glad I'm not missing anything important.

"Warning: Document contains one or more extremely long lines ..."

Hi,

i created a large Integration Services Package. When I start now the Project an open the Package, I get a Message

"Document contains one or more long lines of text. These lines will cause the editor to respond slowly when you open the file. Do you still want to open the file?"

What does this Message mean for me? Which mistake did I?

Thanks a lot

What was a bug prior to SP1. It is just a warning, so for the time being you can just ignore it. That should disappear from new created packages after you apply the latest SP

Here is another discussion about it:

http://forums.microsoft.com/MSDN/Search/Search.aspx?words=Warning%3A+Document+contains++extremely+&searchKey=&lcid=1033&searchscope=forumscope&siteid=1&ForumID=80&ForumGroupID=-1

sql

"VS_ISBROKEN" error

[DTS.Pipeline] Error: "component "Source - Query" (1)" failed validation and returned validation status "VS_ISBROKEN".

I'm getting this error in the Data Flow task when exexuting this sql:

SELECT * FROM tbl_ws_stats WHERE pk > pk_var

pk_var is a package variable which I confirmed is being set correctly. The sql is set as a property expression.

What could be causing this?

using SQL Server 2005

Thanks

What is your property expression? it should be something like:

"SELECT * FROM tbl_ws_stats WHERE pk > " + (DT_STR, 100, 1252)@.[pk_var]

-Jamie

|||Verify that you have a good connection to your database. I check by running a simple query in the "lookup" transform. You can also verify with the connection manager.

I routinely see this error when my Oracle listener is down.

Monday, March 19, 2012

"select where in (select)" behaves strangely

I have noticed that selects that have a "where in (select...)" behave in a way I would not expect them to.

For example:

if object_id('x') is not null drop table x

if object_id('y') is not null drop table y

create table x(x1 int); create table y(y1 int)

insert x values (1); insert x values (2)

insert y values (1); insert y values (2)

select * from x where x1 in (select x1 from y)

/*

x1

--

1

2

*/

I would expect a syntax error here, since table y does not contain a column called x1. When it does contain a column called x1, the query behaves as I would expect it to:

if object_id('x') is not null drop table x

if object_id('y') is not null drop table y

create table x(x1 int); create table y(y1 int, x1 int)

insert x values (1); insert x values (2)

insert y values (1, 3); insert y values (2, 3)

select * from x where x1 in (select x1 from y)

--(0 row(s) affected)

Is this behavior by design?

Thanks,

Ron Rice

Yes, this is basically by design. There was a similar discussion here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1260288&SiteID=1

(search was corelated rowland)

"Select All" option visible in Designer but gone on Report Manager

Hello,

I have several reports that use parameters that I have defined as multi-value. When I am designing the reports I see the "(Select All)" option listed first in each parm control that has the multi-value property set true. However, when the same reports are deployed to our server and viewed through Report Manager, the "(Select All)" option is missing. I need the "(Select All)" to be present.

I've seen some discussion of a service pack. Could this be the problem? What do we need to do to get our "(Select All)" back?

Thanks,

BCB

Hello BCB,

You'll need to apply SP2 to the server with Reporting Services on it. It seems that your local machine already has it applied.

Jarret

|||

Hello Jarret,

Thanks for your response. Can you tell me how to identify the service packs that have been applied to our SQL Server, if any? I checked the SQL Server properties and found a Version property that reads 9.00.2047.00. However, the number doesn't mean anything to me.

How can I tell if SP2 has been applied?

Thanks,

BCB

|||

BCB,

RTM - 2005.90.1399
SP1 - 2005.90.2047
SP2 - 2005.90.3042

This link will tell you which version number corresponds to which service pack:

http://support.microsoft.com/default.aspx/kb/321185

You can also go to the properties of the EXE file to get the version number. For example:

{Drive}:\Program Files\Microsoft SQL Server\MSSQL.{InstanceID_of_RS}\Reporting Services\ReportServer\bin\ReportingServicesService.exe

Jarret

|||

I have the same scenarios (but it's not a problem)

I applied SP2 (AND SP2a) on my local client, so my VS2005 has <Select All> in the Designer, and local Preview

however, our SSRS servers haven't been applied SP2 but only SP1, so no <Select All> there

My local .exe version is 3050 (ie. anything > 3042 is SP2) since SP2a is .3050 :)

|||Thanks to all for the very helpful responses...

Sunday, March 11, 2012

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

This forum is for Analysis Services -related questions. Try posting on "SQL Server Tools General" forum.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

This forum is for Analysis Services -related questions. Try posting on "SQL Server Tools General" forum.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

David,

I will do some research on "Object reference not set to" error. You can edit data directly from the results pane.

Thanks!

|||

David,

We need more information about this error. Are you still able to reproduce this error?

Thanks!

|||

I have never been able to explain why it happened. When I would try to do "open table" I would always get the "object ref not set" error. I did uninstall and when I re-installed the install locked up on "Setting File Security". I had seen that error before and knew to unplug the network connection. After I reinstalled the error went away.

I wanted to know if we can get behahivior similiar to 2000 where a user could enter a sql select and then edit the results in results pane. The open table helps but when you want to quickly change a value the edit of a few rows is easier than finding a row in a large result set. Also I noticed when I unistalled I had to uninstall each component separately. Can the uninstall of sql server 2005 uninstall all components.

thanks

|||

Sounds like "object ref not set" error might have been due to corrupted installation. Please let us know if you encounter that error again.

Current SQL Editor does not allow you to edit directly from the results grid as you've noticed. You can choose Open Table and bring up SQL Pane from the Query Designer by either clicking on a toolbar icon (a whitebox with SQL text in it) or hitting CTRL+3. Then edit the SQL syntax to bring up a sub-set of records for editing.

For uninstallation issue, please provide your feedback through http://lab.msdn.microsoft.com/productfeedback/Default.aspx. All feedbacks received via our Product Feedback center are reviewed by the team and we treat them seriously.

Hope this helps.

Thanks!

|||

Can you give us the logic behind why you can't edit the result set of a query?!?!

I am, frankly, astonished that this feature was removed. It is truly one of the most useful features for a quick edit of data.

On that note, the workaround is that you "open the table"? Am I missing something that doing an "open table" produces all data in the table? So, we have to burden the machine with potentially thousands upon thousands of records just to edit a single field? Crazy!

Also, using a join query after "opening" the table results in read only!

The other way around is to find the right record ID, then write an update query?

Seriously, is there any explanation because it sounds completely ludicrous to me? What was the point of this?

/sorry to seem so annoyed, but so many people rely on this feature. I know I'm not the only one.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

David,

I will do some research on "Object reference not set to" error. You can edit data directly from the results pane.

Thanks!

|||

David,

We need more information about this error. Are you still able to reproduce this error?

Thanks!

|||

I have never been able to explain why it happened. When I would try to do "open table" I would always get the "object ref not set" error. I did uninstall and when I re-installed the install locked up on "Setting File Security". I had seen that error before and knew to unplug the network connection. After I reinstalled the error went away.

I wanted to know if we can get behahivior similiar to 2000 where a user could enter a sql select and then edit the results in results pane. The open table helps but when you want to quickly change a value the edit of a few rows is easier than finding a row in a large result set. Also I noticed when I unistalled I had to uninstall each component separately. Can the uninstall of sql server 2005 uninstall all components.

thanks

|||

Sounds like "object ref not set" error might have been due to corrupted installation. Please let us know if you encounter that error again.

Current SQL Editor does not allow you to edit directly from the results grid as you've noticed. You can choose Open Table and bring up SQL Pane from the Query Designer by either clicking on a toolbar icon (a whitebox with SQL text in it) or hitting CTRL+3. Then edit the SQL syntax to bring up a sub-set of records for editing.

For uninstallation issue, please provide your feedback through http://lab.msdn.microsoft.com/productfeedback/Default.aspx. All feedbacks received via our Product Feedback center are reviewed by the team and we treat them seriously.

Hope this helps.

Thanks!

|||

Can you give us the logic behind why you can't edit the result set of a query?!?!

I am, frankly, astonished that this feature was removed. It is truly one of the most useful features for a quick edit of data.

On that note, the workaround is that you "open the table"? Am I missing something that doing an "open table" produces all data in the table? So, we have to burden the machine with potentially thousands upon thousands of records just to edit a single field? Crazy!

Also, using a join query after "opening" the table results in read only!

The other way around is to find the right record ID, then write an update query?

Seriously, is there any explanation because it sounds completely ludicrous to me? What was the point of this?

/sorry to seem so annoyed, but so many people rely on this feature. I know I'm not the only one.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

David,

I will do some research on "Object reference not set to" error. You can edit data directly from the results pane.

Thanks!

|||

David,

We need more information about this error. Are you still able to reproduce this error?

Thanks!

|||

I have never been able to explain why it happened. When I would try to do "open table" I would always get the "object ref not set" error. I did uninstall and when I re-installed the install locked up on "Setting File Security". I had seen that error before and knew to unplug the network connection. After I reinstalled the error went away.

I wanted to know if we can get behahivior similiar to 2000 where a user could enter a sql select and then edit the results in results pane. The open table helps but when you want to quickly change a value the edit of a few rows is easier than finding a row in a large result set. Also I noticed when I unistalled I had to uninstall each component separately. Can the uninstall of sql server 2005 uninstall all components.

thanks

|||

Sounds like "object ref not set" error might have been due to corrupted installation. Please let us know if you encounter that error again.

Current SQL Editor does not allow you to edit directly from the results grid as you've noticed. You can choose Open Table and bring up SQL Pane from the Query Designer by either clicking on a toolbar icon (a whitebox with SQL text in it) or hitting CTRL+3. Then edit the SQL syntax to bring up a sub-set of records for editing.

For uninstallation issue, please provide your feedback through http://lab.msdn.microsoft.com/productfeedback/Default.aspx. All feedbacks received via our Product Feedback center are reviewed by the team and we treat them seriously.

Hope this helps.

Thanks!

|||

Can you give us the logic behind why you can't edit the result set of a query?!?!

I am, frankly, astonished that this feature was removed. It is truly one of the most useful features for a quick edit of data.

On that note, the workaround is that you "open the table"? Am I missing something that doing an "open table" produces all data in the table? So, we have to burden the machine with potentially thousands upon thousands of records just to edit a single field? Crazy!

Also, using a join query after "opening" the table results in read only!

The other way around is to find the right record ID, then write an update query?

Seriously, is there any explanation because it sounds completely ludicrous to me? What was the point of this?

/sorry to seem so annoyed, but so many people rely on this feature. I know I'm not the only one.

"object does not support this property or method" when trying to print

I have a user that gets the error at the bottom of the screen that states "object does not support this property or method " whenever they lcik on the print button. I have run the same report and do not received the error. Does anyone know how to fix this?

They may have an old version of the print control. They should open the Tools menu in IE, go to Internet Options ->settings ->view objects and then delete the RSClientPrint class. Clicking the print icon should download a new control that should work for them.

-Daniel

Thursday, March 8, 2012

"image" limitation of 510 bytes

Hello,

I have a field in my SQL Server 2000 with type "varbinary(8000)" which I merge onto my SQL CE 2.0 database. On my SQL CE 2.0, this field becomes "image".

Based on Microsoft's site: http://msdn2.microsoft.com/en-us/library/aa257477(SQL.80).aspx, "image" is used if the size is not over 510; however, when I populate this field in SQL CE, the maximum size that is stored is 510 bytes. I have verified my source data was complete (2622 butes) when again when I check the size of the field after an insert, it had only 510 bytes.

What's the work-around?

Thank you.

Try to have a look at this post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=538886&SiteID=1

|||Thanks. I was using "SqlDbType.Binary" in my Parameters. "SqlDbType.Image" fixed it.

Saturday, February 25, 2012

"Could not find schema information ..." error in XSD annotation

When I open any annotated schema in VC# 2005 Express, I get the error:

"Could not find schema information for the attribute 'urn:schemas-microsoft-com:mapping-schema:relation'."

Am I missing a reference? MSXML4.0 and the SQL Client are installed on my workstation.

An example of one of the annotated schemas I've tried is this one, from Andrew Conrad's MSDN article "A Survey of Microsoft SQL Server 2000 XML Features":

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:sql="urn:schemas-microsoft-com:mapping-schema">

<xsd:element name="CustomerRecord" sql:relation="Customers" >

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Contact" sql:field="ContactName"

type="xsd:string" />

... etc. All references to sql:relation, sql:field and sql:relationship produce the same error.

How do you open it?

Thanks

Michael

|||I was opening the schema in the standard editor pane and then clicking on Show Errors in one of the drop-down menus (can't remember which one that is, now). I dumped VC# 2005 Express in favor of C# in VS 2003 Enterprise, which validates the same schema with no problem. The documentation which installed with the Express edition was clearly meant for the standard VS product, anyway, and, so far, schema handling in VS 2003 appears to work as advertised.

Best Regards,

Mike|||

I think the issue may be that the VC# 2005 editor by default expects all namespaces to have schemas associated. I am forwarding this to our schema editor experts to see what's going on.

Thanks

Michael

|||

The schema for these mapping annotations was not shipped in Visual Studio 2005. If you plop the following XSD schema into your "program files\visual studio 8\xml\schema" folder then the errors will go away:

<?xml version="1.0" encoding="utf-8" ?>

<xs:schema targetNamespace="urn:schemas-microsoft-com:mapping-schema"

elementFormDefault="qualified"

xmlns="urn:schemas-microsoft-com:mapping-schema"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:attribute name="encode" type="xs:anyURI">

<xs:annotation>

<xs:documentation>

When an XML element or attribute is mapped to a SQL Server BLOB column, allows requesting a reference URI. This URI can be used later to return BLOB data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="field" type="xs:string">

<xs:annotation>

<xs:documentation>Maps an XML item to a database column.</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="guid" type="guid">

<xs:annotation>

<xs:documentation>

Allows you to specify whether to use a GUID value generated by SQL Server or use the value provided in the updategram for that column.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="hide" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Hides the element or attribute that is specified in the schema in the resulting XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="identity" type="guid">

<xs:annotation>

<xs:documentation>

Can be specified on any node that maps to an IDENTITY-type database column. The value specified for this annotation defines how the corresponding IDENTITY-type column in the database is updated.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="inverse" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Instructs the updategram logic to inverse its interpretation of the parent-child relationship that has been specified using &lt;sql:relationship&gt;

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="is-constant" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Creates an XML element that does not map to any table. The element appears in the query output.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="key-fields" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows specification of column(s) that uniquely identify the rows in a table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-value" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="mapped" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows schema items to be excluded from the result.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="max-depth" type="xs:positiveInteger">

<xs:annotation>

<xs:documentation>

Allows you to specify depth in recursive relationships that are specified in the schema.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="overflow-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Identifies the database column that contains the overflow data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="prefix" type="xs:string">

<xs:annotation>

<xs:documentation>

Creates valid XML ID, IDREF, and IDREFS. Prepends the values of ID, IDREF, and IDREFS with a string.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relation" type="xs:string">

<xs:annotation>

<xs:documentation>

Maps an XML item to a database table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relationship" type="xs:string">

<xs:annotation>

<xs:documentation>

Specifies relationships between XML elements. The parent, child, parent-key, and child-key attributes are used to establish the relationship.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="use-cdata" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows specifying CDATA sections to be used for certain elements in the XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:simpleType name="guid">

<xs:restriction base="xs:string">

<xs:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>

</xs:restriction>

</xs:simpleType>

</xs:schema>

|||Thanks, Chris. That makes perfect sense. I saved the schema and will use it if I try VS C# Express again.

Mike|||

Fine, but where in that folder should the schema be plopped?

Should I be able to deduce the file name from the info in the schema?

Or doesn't the fle name matter?

In that case, please explain the magic that allows it to be fetched in to cure the problem under discusssion

Regards,

Al

|||Al -

I'm no longer using VC# 2005 Express, but the schema name would be mapping-schema.xsd, and I think you would save it to the folder Program Files\Microsoft Visual Studio 8\Xml\Schemas.

There's probably a way to implicitly embed a xsi:schemaLocation directive in your annotated schema, so you could put the mapping-schema in your bin\Debug folder along with the program source files, but I can't figure out what such a directive would look like.

Good luck,

Mike
|||

What should the filename be?

|||

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

|||

RoseD wrote:

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

No. That is still a mystery, unfortunately.

It is absolutely ridiculous.

Releasing a service-pack or at least a patch would be VERY simple; but, the creators obviously have moved on to bigger and better things-- that is, sadly, pretty common for MS these days-- they move on to a new technology before they have fixed Version 1 of a release product. They keep adding bells-and-whistles but they often miss the core features. Oh well. They still have some of the best tools; I just wish there were a little more support for products by the way of services-packs, patches, and add-ons. In fact, I am sure they could have charged a nominal fee ($20, $50, even $100) for the Express tools and then they would have had a budget for product support.

Thank you.

-- Mark Kamoski

|||I wish I could give you a definitive answer, but as I said earlier, I switched to VS 2003 and the problem went away, so I never tried the solution proposed by Chris Lovett. Did you try naming the file "mapping-schema.xsd"? The full path would then be "Program Files\Visual Studio 8\xml\schema\mapping-schema.xsd".|||

This is an actual microsoft.com forum - isn't there a microsoft support engineer that can give a definitive answer to the question, what xsd file contains the xml schema info for remoting configuration files?

"Could not find schema information ..." error in XSD annotation

When I open any annotated schema in VC# 2005 Express, I get the error:

"Could not find schema information for the attribute 'urn:schemas-microsoft-com:mapping-schema:relation'."

Am I missing a reference? MSXML4.0 and the SQL Client are installed on my workstation.

An example of one of the annotated schemas I've tried is this one, from Andrew Conrad's MSDN article "A Survey of Microsoft SQL Server 2000 XML Features":

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:sql="urn:schemas-microsoft-com:mapping-schema">

<xsd:element name="CustomerRecord" sql:relation="Customers" >

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Contact" sql:field="ContactName"

type="xsd:string" />

... etc. All references to sql:relation, sql:field and sql:relationship produce the same error.

How do you open it?

Thanks

Michael

|||I was opening the schema in the standard editor pane and then clicking on Show Errors in one of the drop-down menus (can't remember which one that is, now). I dumped VC# 2005 Express in favor of C# in VS 2003 Enterprise, which validates the same schema with no problem. The documentation which installed with the Express edition was clearly meant for the standard VS product, anyway, and, so far, schema handling in VS 2003 appears to work as advertised.

Best Regards,

Mike
|||

I think the issue may be that the VC# 2005 editor by default expects all namespaces to have schemas associated. I am forwarding this to our schema editor experts to see what's going on.

Thanks

Michael

|||

The schema for these mapping annotations was not shipped in Visual Studio 2005. If you plop the following XSD schema into your "program files\visual studio 8\xml\schema" folder then the errors will go away:

<?xml version="1.0" encoding="utf-8" ?>

<xs:schema targetNamespace="urn:schemas-microsoft-com:mapping-schema"

elementFormDefault="qualified"

xmlns="urn:schemas-microsoft-com:mapping-schema"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:attribute name="encode" type="xs:anyURI">

<xs:annotation>

<xs:documentation>

When an XML element or attribute is mapped to a SQL Server BLOB column, allows requesting a reference URI. This URI can be used later to return BLOB data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="field" type="xs:string">

<xs:annotation>

<xs:documentation>Maps an XML item to a database column.</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="guid" type="guid">

<xs:annotation>

<xs:documentation>

Allows you to specify whether to use a GUID value generated by SQL Server or use the value provided in the updategram for that column.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="hide" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Hides the element or attribute that is specified in the schema in the resulting XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="identity" type="guid">

<xs:annotation>

<xs:documentation>

Can be specified on any node that maps to an IDENTITY-type database column. The value specified for this annotation defines how the corresponding IDENTITY-type column in the database is updated.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="inverse" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Instructs the updategram logic to inverse its interpretation of the parent-child relationship that has been specified using &lt;sql:relationship&gt;

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="is-constant" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Creates an XML element that does not map to any table. The element appears in the query output.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="key-fields" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows specification of column(s) that uniquely identify the rows in a table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-value" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="mapped" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows schema items to be excluded from the result.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="max-depth" type="xs:positiveInteger">

<xs:annotation>

<xs:documentation>

Allows you to specify depth in recursive relationships that are specified in the schema.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="overflow-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Identifies the database column that contains the overflow data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="prefix" type="xs:string">

<xs:annotation>

<xs:documentation>

Creates valid XML ID, IDREF, and IDREFS. Prepends the values of ID, IDREF, and IDREFS with a string.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relation" type="xs:string">

<xs:annotation>

<xs:documentation>

Maps an XML item to a database table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relationship" type="xs:string">

<xs:annotation>

<xs:documentation>

Specifies relationships between XML elements. The parent, child, parent-key, and child-key attributes are used to establish the relationship.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="use-cdata" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows specifying CDATA sections to be used for certain elements in the XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:simpleType name="guid">

<xs:restriction base="xs:string">

<xs:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>

</xs:restriction>

</xs:simpleType>

</xs:schema>

|||Thanks, Chris. That makes perfect sense. I saved the schema and will use it if I try VS C# Express again.

Mike
|||

Fine, but where in that folder should the schema be plopped?

Should I be able to deduce the file name from the info in the schema?

Or doesn't the fle name matter?

In that case, please explain the magic that allows it to be fetched in to cure the problem under discusssion

Regards,

Al

|||Al -

I'm no longer using VC# 2005 Express, but the schema name would be mapping-schema.xsd, and I think you would save it to the folder Program Files\Microsoft Visual Studio 8\Xml\Schemas.

There's probably a way to implicitly embed a xsi:schemaLocation directive in your annotated schema, so you could put the mapping-schema in your bin\Debug folder along with the program source files, but I can't figure out what such a directive would look like.

Good luck,

Mike
|||

What should the filename be?

|||

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

|||

RoseD wrote:

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

No. That is still a mystery, unfortunately.

It is absolutely ridiculous.

Releasing a service-pack or at least a patch would be VERY simple; but, the creators obviously have moved on to bigger and better things-- that is, sadly, pretty common for MS these days-- they move on to a new technology before they have fixed Version 1 of a release product. They keep adding bells-and-whistles but they often miss the core features. Oh well. They still have some of the best tools; I just wish there were a little more support for products by the way of services-packs, patches, and add-ons. In fact, I am sure they could have charged a nominal fee ($20, $50, even $100) for the Express tools and then they would have had a budget for product support.

Thank you.

-- Mark Kamoski

|||I wish I could give you a definitive answer, but as I said earlier, I switched to VS 2003 and the problem went away, so I never tried the solution proposed by Chris Lovett. Did you try naming the file "mapping-schema.xsd"? The full path would then be "Program Files\Visual Studio 8\xml\schema\mapping-schema.xsd".|||

This is an actual microsoft.com forum - isn't there a microsoft support engineer that can give a definitive answer to the question, what xsd file contains the xml schema info for remoting configuration files?

"Could not find schema information ..." error in XSD annotation

When I open any annotated schema in VC# 2005 Express, I get the error:

"Could not find schema information for the attribute 'urn:schemas-microsoft-com:mapping-schema:relation'."

Am I missing a reference? MSXML4.0 and the SQL Client are installed on my workstation.

An example of one of the annotated schemas I've tried is this one, from Andrew Conrad's MSDN article "A Survey of Microsoft SQL Server 2000 XML Features":

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:sql="urn:schemas-microsoft-com:mapping-schema">

<xsd:element name="CustomerRecord" sql:relation="Customers" >

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Contact" sql:field="ContactName"

type="xsd:string" />

... etc. All references to sql:relation, sql:field and sql:relationship produce the same error.

How do you open it?

Thanks

Michael

|||I was opening the schema in the standard editor pane and then clicking on Show Errors in one of the drop-down menus (can't remember which one that is, now). I dumped VC# 2005 Express in favor of C# in VS 2003 Enterprise, which validates the same schema with no problem. The documentation which installed with the Express edition was clearly meant for the standard VS product, anyway, and, so far, schema handling in VS 2003 appears to work as advertised.

Best Regards,

Mike
|||

I think the issue may be that the VC# 2005 editor by default expects all namespaces to have schemas associated. I am forwarding this to our schema editor experts to see what's going on.

Thanks

Michael

|||

The schema for these mapping annotations was not shipped in Visual Studio 2005. If you plop the following XSD schema into your "program files\visual studio 8\xml\schema" folder then the errors will go away:

<?xml version="1.0" encoding="utf-8" ?>

<xs:schema targetNamespace="urn:schemas-microsoft-com:mapping-schema"

elementFormDefault="qualified"

xmlns="urn:schemas-microsoft-com:mapping-schema"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:attribute name="encode" type="xs:anyURI">

<xs:annotation>

<xs:documentation>

When an XML element or attribute is mapped to a SQL Server BLOB column, allows requesting a reference URI. This URI can be used later to return BLOB data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="field" type="xs:string">

<xs:annotation>

<xs:documentation>Maps an XML item to a database column.</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="guid" type="guid">

<xs:annotation>

<xs:documentation>

Allows you to specify whether to use a GUID value generated by SQL Server or use the value provided in the updategram for that column.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="hide" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Hides the element or attribute that is specified in the schema in the resulting XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="identity" type="guid">

<xs:annotation>

<xs:documentation>

Can be specified on any node that maps to an IDENTITY-type database column. The value specified for this annotation defines how the corresponding IDENTITY-type column in the database is updated.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="inverse" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Instructs the updategram logic to inverse its interpretation of the parent-child relationship that has been specified using &lt;sql:relationship&gt;

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="is-constant" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Creates an XML element that does not map to any table. The element appears in the query output.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="key-fields" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows specification of column(s) that uniquely identify the rows in a table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-value" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="mapped" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows schema items to be excluded from the result.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="max-depth" type="xs:positiveInteger">

<xs:annotation>

<xs:documentation>

Allows you to specify depth in recursive relationships that are specified in the schema.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="overflow-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Identifies the database column that contains the overflow data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="prefix" type="xs:string">

<xs:annotation>

<xs:documentation>

Creates valid XML ID, IDREF, and IDREFS. Prepends the values of ID, IDREF, and IDREFS with a string.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relation" type="xs:string">

<xs:annotation>

<xs:documentation>

Maps an XML item to a database table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relationship" type="xs:string">

<xs:annotation>

<xs:documentation>

Specifies relationships between XML elements. The parent, child, parent-key, and child-key attributes are used to establish the relationship.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="use-cdata" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows specifying CDATA sections to be used for certain elements in the XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:simpleType name="guid">

<xs:restriction base="xs:string">

<xs:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>

</xs:restriction>

</xs:simpleType>

</xs:schema>

|||Thanks, Chris. That makes perfect sense. I saved the schema and will use it if I try VS C# Express again.

Mike
|||

Fine, but where in that folder should the schema be plopped?

Should I be able to deduce the file name from the info in the schema?

Or doesn't the fle name matter?

In that case, please explain the magic that allows it to be fetched in to cure the problem under discusssion

Regards,

Al

|||Al -

I'm no longer using VC# 2005 Express, but the schema name would be mapping-schema.xsd, and I think you would save it to the folder Program Files\Microsoft Visual Studio 8\Xml\Schemas.

There's probably a way to implicitly embed a xsi:schemaLocation directive in your annotated schema, so you could put the mapping-schema in your bin\Debug folder along with the program source files, but I can't figure out what such a directive would look like.

Good luck,

Mike
|||

What should the filename be?

|||

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

|||

RoseD wrote:

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

No. That is still a mystery, unfortunately.

It is absolutely ridiculous.

Releasing a service-pack or at least a patch would be VERY simple; but, the creators obviously have moved on to bigger and better things-- that is, sadly, pretty common for MS these days-- they move on to a new technology before they have fixed Version 1 of a release product. They keep adding bells-and-whistles but they often miss the core features. Oh well. They still have some of the best tools; I just wish there were a little more support for products by the way of services-packs, patches, and add-ons. In fact, I am sure they could have charged a nominal fee ($20, $50, even $100) for the Express tools and then they would have had a budget for product support.

Thank you.

-- Mark Kamoski

|||I wish I could give you a definitive answer, but as I said earlier, I switched to VS 2003 and the problem went away, so I never tried the solution proposed by Chris Lovett. Did you try naming the file "mapping-schema.xsd"? The full path would then be "Program Files\Visual Studio 8\xml\schema\mapping-schema.xsd".|||

This is an actual microsoft.com forum - isn't there a microsoft support engineer that can give a definitive answer to the question, what xsd file contains the xml schema info for remoting configuration files?

"Could not find schema information ..." error in XSD annotation

When I open any annotated schema in VC# 2005 Express, I get the error:

"Could not find schema information for the attribute 'urn:schemas-microsoft-com:mapping-schema:relation'."

Am I missing a reference? MSXML4.0 and the SQL Client are installed on my workstation.

An example of one of the annotated schemas I've tried is this one, from Andrew Conrad's MSDN article "A Survey of Microsoft SQL Server 2000 XML Features":

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:sql="urn:schemas-microsoft-com:mapping-schema">

<xsd:element name="CustomerRecord" sql:relation="Customers" >

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Contact" sql:field="ContactName"

type="xsd:string" />

... etc. All references to sql:relation, sql:field and sql:relationship produce the same error.

How do you open it?

Thanks

Michael

|||I was opening the schema in the standard editor pane and then clicking on Show Errors in one of the drop-down menus (can't remember which one that is, now). I dumped VC# 2005 Express in favor of C# in VS 2003 Enterprise, which validates the same schema with no problem. The documentation which installed with the Express edition was clearly meant for the standard VS product, anyway, and, so far, schema handling in VS 2003 appears to work as advertised.

Best Regards,

Mike|||

I think the issue may be that the VC# 2005 editor by default expects all namespaces to have schemas associated. I am forwarding this to our schema editor experts to see what's going on.

Thanks

Michael

|||

The schema for these mapping annotations was not shipped in Visual Studio 2005. If you plop the following XSD schema into your "program files\visual studio 8\xml\schema" folder then the errors will go away:

<?xml version="1.0" encoding="utf-8" ?>

<xs:schema targetNamespace="urn:schemas-microsoft-com:mapping-schema"

elementFormDefault="qualified"

xmlns="urn:schemas-microsoft-com:mapping-schema"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:attribute name="encode" type="xs:anyURI">

<xs:annotation>

<xs:documentation>

When an XML element or attribute is mapped to a SQL Server BLOB column, allows requesting a reference URI. This URI can be used later to return BLOB data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="field" type="xs:string">

<xs:annotation>

<xs:documentation>Maps an XML item to a database column.</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="guid" type="guid">

<xs:annotation>

<xs:documentation>

Allows you to specify whether to use a GUID value generated by SQL Server or use the value provided in the updategram for that column.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="hide" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Hides the element or attribute that is specified in the schema in the resulting XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="identity" type="guid">

<xs:annotation>

<xs:documentation>

Can be specified on any node that maps to an IDENTITY-type database column. The value specified for this annotation defines how the corresponding IDENTITY-type column in the database is updated.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="inverse" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Instructs the updategram logic to inverse its interpretation of the parent-child relationship that has been specified using &lt;sql:relationship&gt;

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="is-constant" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Creates an XML element that does not map to any table. The element appears in the query output.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="key-fields" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows specification of column(s) that uniquely identify the rows in a table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="limit-value" type="xs:string">

<xs:annotation>

<xs:documentation>

Allows limiting the values that are returned on the basis of a limiting value.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="mapped" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows schema items to be excluded from the result.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="max-depth" type="xs:positiveInteger">

<xs:annotation>

<xs:documentation>

Allows you to specify depth in recursive relationships that are specified in the schema.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="overflow-field" type="xs:string">

<xs:annotation>

<xs:documentation>

Identifies the database column that contains the overflow data.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="prefix" type="xs:string">

<xs:annotation>

<xs:documentation>

Creates valid XML ID, IDREF, and IDREFS. Prepends the values of ID, IDREF, and IDREFS with a string.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relation" type="xs:string">

<xs:annotation>

<xs:documentation>

Maps an XML item to a database table.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="relationship" type="xs:string">

<xs:annotation>

<xs:documentation>

Specifies relationships between XML elements. The parent, child, parent-key, and child-key attributes are used to establish the relationship.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="use-cdata" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Allows specifying CDATA sections to be used for certain elements in the XML document.

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:simpleType name="guid">

<xs:restriction base="xs:string">

<xs:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>

</xs:restriction>

</xs:simpleType>

</xs:schema>

|||Thanks, Chris. That makes perfect sense. I saved the schema and will use it if I try VS C# Express again.

Mike|||

Fine, but where in that folder should the schema be plopped?

Should I be able to deduce the file name from the info in the schema?

Or doesn't the fle name matter?

In that case, please explain the magic that allows it to be fetched in to cure the problem under discusssion

Regards,

Al

|||Al -

I'm no longer using VC# 2005 Express, but the schema name would be mapping-schema.xsd, and I think you would save it to the folder Program Files\Microsoft Visual Studio 8\Xml\Schemas.

There's probably a way to implicitly embed a xsi:schemaLocation directive in your annotated schema, so you could put the mapping-schema in your bin\Debug folder along with the program source files, but I can't figure out what such a directive would look like.

Good luck,

Mike
|||

What should the filename be?

|||

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

|||

RoseD wrote:

Did you ever find out how the file should be named? I am having the same endless messages and i would like to get rid of them.

Thanks,

No. That is still a mystery, unfortunately.

It is absolutely ridiculous.

Releasing a service-pack or at least a patch would be VERY simple; but, the creators obviously have moved on to bigger and better things-- that is, sadly, pretty common for MS these days-- they move on to a new technology before they have fixed Version 1 of a release product. They keep adding bells-and-whistles but they often miss the core features. Oh well. They still have some of the best tools; I just wish there were a little more support for products by the way of services-packs, patches, and add-ons. In fact, I am sure they could have charged a nominal fee ($20, $50, even $100) for the Express tools and then they would have had a budget for product support.

Thank you.

-- Mark Kamoski

|||I wish I could give you a definitive answer, but as I said earlier, I switched to VS 2003 and the problem went away, so I never tried the solution proposed by Chris Lovett. Did you try naming the file "mapping-schema.xsd"? The full path would then be "Program Files\Visual Studio 8\xml\schema\mapping-schema.xsd".

Sunday, February 19, 2012

"[DBNETLIB]ConnectionWrite (send())" && "Communication link failure"

Hi ALL

I am facing a strange problem using ADO to connect Sql Server that I can not resolve it.

My program connected to SqlServer when it started, the state of the connectionPtr was adoStateOpen.Then I disable the network card and enable it immeditately, the errors happened when I executed the sql query probably because of connectionPtr was invalid,but the state of connectionPtr was always adoStateOpen.

1)Msg: Unspecified error Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send()).

2)Msg: Unspecified error Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL Server Driver]Communication link failure.

Should I reconnect to SqlServer?How can I catch this error when the connection is valid except other errors?

Sorry,my english is poor and thanks for your response.

Thanks a lot.

Env:

1)OS : Windows 2000 Server

2)SqlServer:Sql Server 2000

When you disable network card, the OS may inform network layer to invalidate the socket we are using. The problem you described could happen, and we don't support this scenario.

Btw, why do you want to disable network card?

"[DBNETLIB]ConnectionWrite (send())" && "Communication link failure"

Hi ALL

I am facing a strange problem using ADO to connect Sql Server that I can not resolve it.

My program connected to SqlServer when it started, the state of the connectionPtr was adoStateOpen.Then I disable the network card and enable it immeditately, the errors happened when I executed the sql query probably because of connectionPtr was invalid,but the state of connectionPtr was always adoStateOpen.

1)Msg: Unspecified error Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send()).

2)Msg: Unspecified error Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL Server Driver]Communication link failure.

Should I reconnect to SqlServer?How can I catch this error when the connection is valid except other errors?

Sorry,my english is poor and thanks for your response.

Thanks a lot.

Env:

1)OS : Windows 2000 Server

2)SqlServer:Sql Server 2000

When you disable network card, the OS may inform network layer to invalidate the socket we are using. The problem you described could happen, and we don't support this scenario.

Btw, why do you want to disable network card?