Showing posts with label attempting. Show all posts
Showing posts with label attempting. Show all posts

Wednesday, March 28, 2012

Invalid XML Elements found inside cync block

I'm receiving the following error when attempting to execute an
updategram using SQL 2005 and SQLXML 4.0
FrostingModel.Tests.Artist.InvalidConcurrencyUpdate :
Microsoft.Data.SqlXml.SqlXmlException : HRESULT="0x80004005"
Description="Invalid XML elements found inside sync block"
Here is my updategram.
<u>
<updg:sync mapping-schema=".\Schemata\Artist.xsd" nullvalue="NULL"
xmlns:updg="urn:schemas-microsoft-com:xml-updategram">
<updg:before>
<ns1:Artist updg:id="0" ArtistID="1716"
UpdateStamp="AAAAAAAADUw=" xmlns:ns1="urn:Frosting" />
</updg:before>
<updg:after>
<ns1:Artist updg:id="0" ArtistID="1716" Name="Blah Blah Update"
xmlns:ns1="urn:Frosting" />
</updg:after>
</updg:sync>
</u>
And here is the accompanying schema:
<xsd:complexType name="Artist">
<xsd:attribute name="ArtistID" type="xsd:int" use="required"
sql:identity="ignore" sql:datatype="int" />
<xsd:attribute name="Name" type="xsd:string" use="optional"
sql:datatype="nvarchar" />
<xsd:attribute name="UpdateStamp" use="optional" dt:type="bin.hex"
sql:datatype="timestamp" sql2:concurrency="UseValue" />
</xsd:complexType>
It should be noted that if I use concurrency on the Name attribute, it
works as expected. However I would prefer to use a timestamp - it's
the timestamp that seems to be the big proverbial pain in the arse.
I can't seem to find any solutions online regarding this problem... any
takers?
- ryan.Okay...
I changed my UpdateStamp value to be something like 0x000000000000101A
and the updategram worked as expected. However this doesn't make any
sense, because SQL 2005's FOR XML EXPLICIT returns the timestamp value
in a 12 character format such as "AAAAAAAADUw=", not in the above
format.
Am I missing something, or is this a bug in SQLXML 4.0 / SQL 2005? How
is it that SQL 2005 can emit a timestamp value in that "AAA..." format,
but it can't accept it? Do I have to do some type of conversion on my
client side after I receive the timestamp value from sql server?
Any help would be appreciated,
- cranley
cranley wrote:
> I'm receiving the following error when attempting to execute an
> updategram using SQL 2005 and SQLXML 4.0
> FrostingModel.Tests.Artist.InvalidConcurrencyUpdate :
> Microsoft.Data.SqlXml.SqlXmlException : HRESULT="0x80004005"
> Description="Invalid XML elements found inside sync block"
> Here is my updategram.
> <u>
> <updg:sync mapping-schema=".\Schemata\Artist.xsd" nullvalue="NULL"
> xmlns:updg="urn:schemas-microsoft-com:xml-updategram">
> <updg:before>
> <ns1:Artist updg:id="0" ArtistID="1716"
> UpdateStamp="AAAAAAAADUw=" xmlns:ns1="urn:Frosting" />
> </updg:before>
> <updg:after>
> <ns1:Artist updg:id="0" ArtistID="1716" Name="Blah Blah Update"
> xmlns:ns1="urn:Frosting" />
> </updg:after>
> </updg:sync>
> </u>
> And here is the accompanying schema:
> <xsd:complexType name="Artist">
> <xsd:attribute name="ArtistID" type="xsd:int" use="required"
> sql:identity="ignore" sql:datatype="int" />
> <xsd:attribute name="Name" type="xsd:string" use="optional"
> sql:datatype="nvarchar" />
> <xsd:attribute name="UpdateStamp" use="optional" dt:type="bin.hex"
> sql:datatype="timestamp" sql2:concurrency="UseValue" />
> </xsd:complexType>
> It should be noted that if I use concurrency on the Name attribute, it
> works as expected. However I would prefer to use a timestamp - it's
> the timestamp that seems to be the big proverbial pain in the arse.
> I can't seem to find any solutions online regarding this problem... any
> takers?
> - ryan.

Friday, March 23, 2012

invalid object name (sql server

I am attempting to call a user defined function from a stored procedure in the same database, and I get the following error:

Invalid object name 'dbo.fn_NewSplit'.

I've tried calling it as dbo.fn_NewSplit, fn_NewSplit etc. I also setup another that had my DB login IE ihomesm_maindb.fn_NewSplit and get the same results.

Interestingly there is another previously built stored procedure calling the same function with apparantly no problems.

Also, I have tried to execute this stored procedure with both my .net application and within the query analyzer with the same error.

Can you post the function code as well as your TSQL calling the function?

|||

jmhooten:

I am attempting to call a user defined function from a stored procedure in the same database, and I get the following error:

Invalid object name 'dbo.fn_NewSplit'.

I've tried calling it as dbo.fn_NewSplit, fn_NewSplit etc. I also setup another that had my DB login IE ihomesm_maindb.fn_NewSplit and get the same results.

Interestingly there is another previously built stored procedure calling the same function with apparantly no problems.

Also, I have tried to execute this stored procedure with both my .net application and within the query analyzer with the same error.

Well, thank you Sql Server developers, my issue wasn't that the object name wasn't valid, it was that I was not calling it correctly (I should have called the function within a SELECT statement in my case) the last question lead me to the answer.

Wednesday, March 21, 2012

Invalid Object Name

Can anyone help me out with an error that I get when
attempting to create a dataset that uses a stored
procedure? I wrote a moderately complex sp that utilizes
temporary tables. In fact, the result set returned is
that of a select statement against a temp table. However,
when I try to define a new dataset for a report that I am
writing, I get the following error message:
Could not generate a list of fields for the query
Check the query syntax or click refresh fields on the
query toolbar
Invalid object name '#Tmp'
Of course #Tmp is the name of the temporary table that I
am selecting from to return the result set.
Any help would be appreciated. I am using a fresh install
of reporting services without any service packs applied.
Thanks!
TimTry declaring a table variable instead.
"Tim" wrote:
> Can anyone help me out with an error that I get when
> attempting to create a dataset that uses a stored
> procedure? I wrote a moderately complex sp that utilizes
> temporary tables. In fact, the result set returned is
> that of a select statement against a temp table. However,
> when I try to define a new dataset for a report that I am
> writing, I get the following error message:
> Could not generate a list of fields for the query
> Check the query syntax or click refresh fields on the
> query toolbar
> Invalid object name '#Tmp'
> Of course #Tmp is the name of the temporary table that I
> am selecting from to return the result set.
> Any help would be appreciated. I am using a fresh install
> of reporting services without any service packs applied.
> Thanks!
> Tim
>|||Tim:
Your solution to the temp table is better than mine and I would like to learn more about the local variable of type Table. Would you PLEASE share it with me.
I don't understand what do you mean by local variable of type Table. May I PLEASE have the URL to this local variable.
Thanks!
Augusta
"Tim" wrote:
> Can anyone help me out with an error that I get when
> attempting to create a dataset that uses a stored
> procedure? I wrote a moderately complex sp that utilizes
> temporary tables. In fact, the result set returned is
> that of a select statement against a temp table. However,
> when I try to define a new dataset for a report that I am
> writing, I get the following error message:
> Could not generate a list of fields for the query
> Check the query syntax or click refresh fields on the
> query toolbar
> Invalid object name '#Tmp'
> Of course #Tmp is the name of the temporary table that I
> am selecting from to return the result set.
> Any help would be appreciated. I am using a fresh install
> of reporting services without any service packs applied.
> Thanks!
> Tim
>

Invalid IP address exception

I'm attempting to deploy an application that uses SQL Server 2005 Express as a back end. I installed the application on 6 or 7 machines, and on two of those machines I'm getting an error message I just don't understand. When I try to connect to the database, I'm getting "System Exception: An invalid IP address was specified.". I'm using the <machine name>\<instance name> to log into the server and I can ping the associated IP address. What's even more confusing is that I can log onto this instance from any of the other machines with no problem. I'm assuming the problem isn't with the SQL instance but a setting I'm missing on the machine, but for the life of me I can't find anything. Any help would be greatly appreciated.

Chris

Can you check this blog and see if there is any alias defined on the specific machine?

http://blogs.msdn.com/sql_protocols/archive/2007/01/07/connection-alias.aspx

Monday, March 19, 2012

Invalid destination path when trying to create distribution database

Hello. I am attempting to add a distribution database to an instance of SQL Server on my local PC. I am using SQL 2005 Developer Edition. I am able to set the instance up as a distributor using the following command:

exec sp_adddistributor @.distributor = N'computername\instancename'

I use the following command to create the distribution database:

exec sp_adddistributiondb @.database = N'distribution', @.data_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data',

@.data_file_size = 4, @.log_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data',

I get the following error when executing that command:

Msg 14430, Level 16, State 1, Procedure sp_adddistributiondb, Line 214

Invalid destination path C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data.

It's not due to permissions on that particular folder. I have tried using other folders, all with the same results. Also, I am an Administrator on the PC, so I have full permissions. I have tried running the SQL Server services as myself and Local System. Same results both times. Co-workers with apparently the same setup are able to create the distribution database without a problem.

Has anybody had this type of problem?

Thanks,

Evan

I executed the same thing above, but different path, and it worked for me. Proc sp_adddistributiondb is raising error 14430 because proc sp_MSget_file_existence cannot locate the path you specified. I'd run a profiler trace to see why this proc cannot locate your path.

Sunday, February 19, 2012

Internet Replication

I am attempting to setup a publication where I'm replicating date between 2
sql 2000 servers via the internet. The snapshots are configured to be written
to ftp to be downloaded by the untrusted subscribers via ftp. I'm having
troubles with not having access to the distributor, this wasnt an issue until
I restricted access to RPC on the firewall seperating the
distributor/publication and the subscriber. The subscribers get the error
'the process could not connect to Distributor <SERVER>'
Is there a way to give access the distributor via ftp (or some other way)
and how is this done?
Do particular types of replication require access to the distributor (can I
get away with no distributor access)?
If I setup up an updating subscription, what is the best way to achieve an
updating subscription over the internet without a vpn?
Any help would be greatly appreciated.
-James
Nobody can help?
"James" wrote:

> I am attempting to setup a publication where I'm replicating date between 2
> sql 2000 servers via the internet. The snapshots are configured to be written
> to ftp to be downloaded by the untrusted subscribers via ftp. I'm having
> troubles with not having access to the distributor, this wasnt an issue until
> I restricted access to RPC on the firewall seperating the
> distributor/publication and the subscriber. The subscribers get the error
> 'the process could not connect to Distributor <SERVER>'
> Is there a way to give access the distributor via ftp (or some other way)
> and how is this done?
> Do particular types of replication require access to the distributor (can I
> get away with no distributor access)?
> If I setup up an updating subscription, what is the best way to achieve an
> updating subscription over the internet without a vpn?
> Any help would be greatly appreciated.
> -James