Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Thursday, March 29, 2012

Convert a sql express to mysql

Hello.

I have created a web site using visual web developer (free download) The website was created using asp.net 2.0. The vwd I have incorporated the cool new roles and membership features of asp.net 2.0. When i did this vwd automatically created a sql express database (aspnetdb.mdf) to hold the login stuff.

I then purchased som e web hosting from a company and found out that they only support MySQL databases.

My questions are;

1. Can anyone tell me the difference between the two types of database (i know what sql express is but am not sure what MySQL is)

2. Secondly, is there a tool or way I can convert the SQL Express database to a MySQL database?

TIA

ICW

MySQL is a rather poor database that lots of people use illegally because they think it's free. If the web hosting company is charging you for hosting, they are using MySQL commercially and either paying for it or breaking the law.

Odds are that the SQL Server database is using stored procs, if this is so, then possibly not. If it's just using tables and dynamic queries, then probably.

|||

Thanks

The SQL Express database does indeed have several stored procs "aspnet_membership...". are you saying that MySQL cannot do stored procedures?

Regards

ICW

|||Hi there,

Yes, MySQL does have stored procedures. It didn't use to (pre version 5.0) but it does now. Please see this link for a write-up: http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html

If the hosting company you have chosen is using anything before MySQL 5.0 then stored procedures are out of the question. Also, if the stored procedures are using T-SQL specific constructs then you may have to find their equivalents (if they exist) in MySQL. For example, if you use X() in SQL Server the equivalent may be Y() in MySQL and so when you code your MySQL stored procedure you use Y().

However, if your stored procedures are doing something fancy then chances are you won't find a MySQL equivalent (although MySQL is faithful to all the standard SQL constructs for the most part so if you only use standard SQL then there's a chance there that you can migrate (reasonably) painlessly).

I have never had the experience of doing a SQL Server --> MySQL conversion, but here is a page that may help you:
http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html

A quick browse shows it references a few tools that you might use and also has links to forums and other places where people (like MySQL experts) could offer some good advice.

Sorry I can't be of more help at the mo.
|||

Thanks for your help

regards

ICW

|||

Hi everyone

I too have been struggling to deploy the ASPNETDB database on alternative platforms. From many hours of reading MS documentation it seems that the only answer is to create your own Membership and Role providers that conform to the published API of ASP.NET This means writing a lot of code but it can be done. You also have to tell your application to use your version rather than the default one by altering the settings in the web.config file.

It seems that Microsoft left the door open for this and publish guidance to that effect. It's not a question of converting the tables etc, you can't do it! Its a matter of providing an interface between the objects built-in to the Framework class library and your own database engine and data files.

Now the real question is has anyone out there done this for MySql? Is there a software company selling addons to support it?

Regards

Phil Hall

Convert a sql express to mysql

Hello.

I have created a web site using visual web developer (free download) The website was created using asp.net 2.0. The vwd I have incorporated the cool new roles and membership features of asp.net 2.0. When i did this vwd automatically created a sql express database (aspnetdb.mdf) to hold the login stuff.

I then purchased som e web hosting from a company and found out that they only support MySQL databases.

My questions are;

1. Can anyone tell me the difference between the two types of database (i know what sql express is but am not sure what MySQL is)

2. Secondly, is there a tool or way I can convert the SQL Express database to a MySQL database?

TIA

ICW

MySQL is a rather poor database that lots of people use illegally because they think it's free. If the web hosting company is charging you for hosting, they are using MySQL commercially and either paying for it or breaking the law.

Odds are that the SQL Server database is using stored procs, if this is so, then possibly not. If it's just using tables and dynamic queries, then probably.

|||

Thanks

The SQL Express database does indeed have several stored procs "aspnet_membership...". are you saying that MySQL cannot do stored procedures?

Regards

ICW

|||Hi there,

Yes, MySQL does have stored procedures. It didn't use to (pre version 5.0) but it does now. Please see this link for a write-up: http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html

If the hosting company you have chosen is using anything before MySQL 5.0 then stored procedures are out of the question. Also, if the stored procedures are using T-SQL specific constructs then you may have to find their equivalents (if they exist) in MySQL. For example, if you use X() in SQL Server the equivalent may be Y() in MySQL and so when you code your MySQL stored procedure you use Y().

However, if your stored procedures are doing something fancy then chances are you won't find a MySQL equivalent (although MySQL is faithful to all the standard SQL constructs for the most part so if you only use standard SQL then there's a chance there that you can migrate (reasonably) painlessly).

I have never had the experience of doing a SQL Server --> MySQL conversion, but here is a page that may help you:
http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html

A quick browse shows it references a few tools that you might use and also has links to forums and other places where people (like MySQL experts) could offer some good advice.

Sorry I can't be of more help at the mo.
|||

Thanks for your help

regards

ICW

|||

Hi everyone

I too have been struggling to deploy the ASPNETDB database on alternative platforms. From many hours of reading MS documentation it seems that the only answer is to create your own Membership and Role providers that conform to the published API of ASP.NET This means writing a lot of code but it can be done. You also have to tell your application to use your version rather than the default one by altering the settings in the web.config file.

It seems that Microsoft left the door open for this and publish guidance to that effect. It's not a question of converting the tables etc, you can't do it! Its a matter of providing an interface between the objects built-in to the Framework class library and your own database engine and data files.

Now the real question is has anyone out there done this for MySql? Is there a software company selling addons to support it?

Regards

Phil Hall

Tuesday, March 27, 2012

Convert .MDF to .bak

hi friends i am using vwd 2005 i created a project now i want to upload it on the server, but i want which database i used in the database convert it into .bak file for upload it on the server how i convert it, i don't have MS SQL SERVER 2005 or any except vwd 2005.

Whthout the SQL server where you had the DB at first place .. ??

Sunday, March 25, 2012

Conversion of DTS Application to SSIS Application - SourceConnectionId and SourceObjectName

Hello All,

I am trying to convert an application created using DTS classes to SSIS object model. I have found following code in the application.

For x As Integer = 1 To mTask.Properties.Count

If mTask.Properties.Item(x).Name = "SourceConnectionID" Then

CnID = mTask.Properties.Item(x).Value

Exit For

End If

Next

For x As Integer = 1 To mPkg.DTSPackage.Connections.Count

If mPkg.DTSPackage.Connections.Item(x).ID = CnID Then

Return mPkg.DTSPackage.Connections.Item(x).Name

End If

Next

Return mTask.Properties.Item("SourceObjectName").Value

How can I retrieve or Set "SourceConnectinId", "SourceObjectName" of a data flow task in SSIS

Please help me to solve this problem.

Thanks in advance

Subin

Hello All,

How can I retrieve source and destination connection information of a data flow task through code (c#) . My dataflow task have one flat file source, script task and oledb destination. In SQL Server 2000 DTS, there is a SourceConnectionId property to get connection information. Which SSIS property is equivalent to SourceConnectionId of DTS?.

Please help me

Thanks in advance

Subin

|||Subin,
I've merged these two posts from you as they are the same topic. Please don't start a new thread for the same topic you've already posted about.

Thanks,
Phil Brammer|||

Subin wrote:

Hello All,

How can I retrieve source and destination connection information of a data flow task through code (c#) . My dataflow task have one flat file source, script task and oledb destination. In SQL Server 2000 DTS, there is a SourceConnectionId property to get connection information. Which SSIS property is equivalent to SourceConnectionId of DTS?.

Please help me

Thanks in advance

Subin

There is no apples-to-apples equivalent. DTS and SSIS have very different object models.

You will have to iterate over the SSIS object model exactly as you did in DTS. This post should help:

Building Packages Programatically

http://blogs.conchango.com/jamiethomson/archive/2007/03/28/SSIS_3A00_-Building-Packages-Programatically.aspx

As Phil says - there is no need to post a thread more than once unless it has gone unanswered and therefore hidden many pages back.

-Jamie

|||Components reference connections through the RuntimeConnectionCollection collection, a property of the IDTSComponentMetaData90 class.

Conversion of "True" or "False" textfields to display "Yes" or &qu

Hi All,

I've created a report that has some textfields containing "TRUE" or "FALSE" as data output when I run the report. How do I convert these textfields to display "YES" or "NO" in the output when I run my report. (bits)

Please advise.

Thanks for your time and help.

=iif(Fields!ThisRow.Value = "True", "Yes", "No")|||

Thanks Brad !! I have another question...Is it possible to represent this column data as a Checkbox?

Please advise.

THanks.

|||

You could use wingdings font checkmark & a border around a textbox, with a conditional expression to display of the checkmark.

cheers,

Andrew

|||

Set properties of your textbox like this:

Borderstyle
Default = Solid
Font
FontFamily = Wingdings2
Expression
Value =iif(Fields!ThisRow.Value = "True", "P", "" )

Hope this helps.

Jarret

|||

Hi

Check this link:http://www.sqljunkies.com/HowTo/0D746276-352D-42D9-A2BB-225C0B2A3AB5.scuk

Hope this helps.

|||Thanks to you all for your help

Conversion of "True" or "False" textfields to display "Yes" or

Hi All,

I've created a report that has some textfields containing "TRUE" or "FALSE" as data output when I run the report. How do I convert these textfields to display "YES" or "NO" in the output when I run my report. (bits)

Please advise.

Thanks for your time and help.

=iif(Fields!ThisRow.Value = "True", "Yes", "No")|||

Thanks Brad !! I have another question...Is it possible to represent this column data as a Checkbox?

Please advise.

THanks.

|||

You could use wingdings font checkmark & a border around a textbox, with a conditional expression to display of the checkmark.

cheers,

Andrew

|||

Set properties of your textbox like this:

Borderstyle
Default = Solid
Font
FontFamily = Wingdings2
Expression
Value =iif(Fields!ThisRow.Value = "True", "P", "" )

Hope this helps.

Jarret

|||

Hi

Check this link:http://www.sqljunkies.com/HowTo/0D746276-352D-42D9-A2BB-225C0B2A3AB5.scuk

Hope this helps.

|||Thanks to you all for your help

Monday, March 19, 2012

Controls on reports

Hi,
I have just created my first report using VS.NET 2005 and Reporting
Services. There is a small choice of controls to une on my reports.
The simplest control is Label, which I cannot find.
Please tell me how to place some text on a report.
regards
PrzemoThere is no difference between text and label. The reason is, this is a
report not a data entry form so it is not necessary to differentiate between
them. Put a text box on the form and then just type in whatever text you
want. Or, if you are going to be more complicated, set it to an expression
and use the expression builder to put in more complex text (for instance you
can refer to the parameters so you can show what parameters the user picked
when running the report).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:C75CC836-E033-4ACD-9FE1-35992B25B326@.microsoft.com...
> Hi,
> I have just created my first report using VS.NET 2005 and Reporting
> Services. There is a small choice of controls to une on my reports.
> The simplest control is Label, which I cannot find.
> Please tell me how to place some text on a report.
> regards
> Przemo

Sunday, March 11, 2012

Controling Names of Agents

Hello there
After i've created my replication I aslo create script for recreating it
again.
However, After i create the replication again the names of my Jobs are being
changed.
Is there a way to create constant name to the replication jobs?
Roy,
not as far as I know. However provided you know the name of the publication,
you can determine the name of the jobs after replication is set up and use
it in code.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||This is to prevent two jobs having the same name. There is a "bug" where if
you create two publications with the same name in different database your
agents will disappear in the agents folders. You can still pass the names
you want in your script using the agent_names parameter.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:OQocpByAGHA.324@.TK2MSFTNGP10.phx.gbl...
> Hello there
> After i've created my replication I aslo create script for recreating it
> again.
> However, After i create the replication again the names of my Jobs are
> being
> changed.
> Is there a way to create constant name to the replication jobs?
>

Control text color according to data value?

Hi,
I am new to SSRS, I have recently created a report. The report has a data
field of 'Status' with two possible value 'Success' and 'Failed'. I would
like to control the text colr accordingly. i.e. if the value is 'Success'
then the color is green, otherwise, the color is red. But I don't know how,
please help.Use an expression. Assuming the text is in a texbox control...
Color property, select <expression>
=IIF(Fields!Description.Value="Success", "Green", "Red")
Steve MunLeeuw
"Hong Wang" <HongWang@.discussions.microsoft.com> wrote in message
news:32131897-E3A2-4FDB-A766-466643E53240@.microsoft.com...
> Hi,
> I am new to SSRS, I have recently created a report. The report has a data
> field of 'Status' with two possible value 'Success' and 'Failed'. I would
> like to control the text colr accordingly. i.e. if the value is 'Success'
> then the color is green, otherwise, the color is red. But I don't know
> how,
> please help.

Thursday, March 8, 2012

Control names of fields when exporting to CSV

My query returns fields that have spaces in the names, for example:

select o.OrderID as 'INVOICE NUMBER', etc..

When I created the DataSet for this query in report designer, it changed all spaces in the field names to underscores, i.e. INVOICE_NUMBER.

This report must be exported to CSV, and the names of the fields (first row in csv) must have the spaces, not underscores. But it appears RS uses the field names (not the names in the column headers of the report table control) as the field names. Is there any way for me to force the field names in the first row of the csv to something other than the field names in the DataSet?

Thanks!

I think I you should be able to rename the column headers to change the results in the CSV file.


HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

ALFKI,

You can go to the column properties data output tab and enter the "Element Name" and select output as "Yes" this is how I can my export to csv files.

Ham

|||

should read

"how I change my export column names in the csv files"

|||Thanks - the only problem is, Element Name cannot contain a space , hence the underscores. Oh, well...|||

ALFKI,

Sorry, Yes, you are still bounded by the textbox property field names. You could not for instance name a textbox "My Textbox Value" is must be My_TextBox_Value. I mistaken thought you were just trying to rename the field.

Ham

Control Flow design question

hi all of you,

I haven’t idea if the following description is a issue or not, anyway:

I begin from Control Flow layer.

I’ve created a sequence container and inside I’ve got two groups, one own a sql task and another one own a Data Flow task. Both are linked for a completion conector. Up to here everything is fine. But when I collapse my sequence container the arrow remains there for these tasks and you can see the sequence container “closed” and the arrow lonely.

Not very esthetic, not practical.

Any clarification or though will be as usual welcomed

I've seen similar problems in the past. I think this is termed a "ghost" - meaning that the UI is getting lost somehow.

The SSIS team will want to know about this so bug it at Microsoft Connect with a screenshot! And if you post a repro - even better!

-Jamie

|||

hi Jamie,

Well, at first if you collapse both groups and then the sequence container the arrow is not visible at all..

f..stuff

|||

I don't doubt it. These things are hard to reproduce and we shouldn't try and explain why they happen. If you can repro it on demand tho - you should bug it.

-Jamie

|||

Maybe the problem is that we're assuming that BIDS have capabilities such as the ones that shows VISIO or something like that. Error.

see you

|||

Did you raise the bug?

|||No, laziness

Friday, February 24, 2012

Contains

I have created a full-text catalog in pubs and also include the lname of
employee table in the index.
However, I got empty result set with the SQL when execute in the Query
Analyser :
SELECT *
FROM employee
WHERE contains(lname, 'Perente')I think the pubs database has 'Parente' not 'Perente' :-)
If lname was well written check that the service account used by Full-Text
Search has permissions on the SQL Server instance.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Alan" wrote:

> I have created a full-text catalog in pubs and also include the lname of
> employee table in the index.
> However, I got empty result set with the SQL when execute in the Query
> Analyser :
> SELECT *
> FROM employee
> WHERE contains(lname, 'Perente')
>
>

Sunday, February 19, 2012

Consuming Web Services from the SQL CLR

Hi there,

I've been following Vineets and David's procedures to consume web

services using SQL CLR to the t. I created my web service in C#.NET

2005, and generated my proxy using this command:


wsdl /par:oldwsdlconfig.xml /o:ExactMobileService.cs /n:Project360.SmsService http://www.exactmobile.co.za/interactive/interactivewebservice.asmx

I added both files to the project, set Generate Serialization Assembly to on and compiled it.
I then generated a strong name key for the assembly and signed my assembly with that key.
Inside my post-build event I added the following script:


"E:\Development\Microsoft

Visual Studio 8\SDK\v2.0\Bin\sgen.exe" /force

/compiler:/keyfile:SmsServiceKey.snk /t:StoredProcedures

$(TargetDir)$(TargetName).dll


This compiled into my assembly, the XmlSerializer assembly and then added strong name key to both.


In SQL Server 2005, I enabled CLR, made my DB trustworthy, created my

first assembly with permissions EXTERNAL ACCESS and then the

XmlSerializer assembly with permissions SAFE. I created my stored

procedure and ran it. When I did I got this error which I assumed the

XmlSerializer was supposed to solve for me:

System.InvalidOperationException:

Cannot load dynamically generated serialization assembly. In some

hosting environments assembly load functionality is restricted,

consider using pre-generated serializer. Please see inner exception for

more information. > System.IO.FileLoadException: LoadFrom(),

LoadFile(), Load(byte[]) and LoadModule() have been disabled by the

host.

I have seen alot of posts about this error, but none of them has been able to solve my problem.

Please can you help me?

O'Connor

Hi O'Connor,

As you have experienced, there are a few cases where sgen does not solve the problem of dynamically loading the XmlSerializer assembly.There is usually always a possible workaround, but it can vary depending on exactly what your code is doing.I was intending on writing some more blog posts about solutions to these dynamic assembly loading problems, but haven't had the time to finish them yet.

The problem you're most likely hitting is that the code doing the XmlSerialization uses an XmlSerializer constructor that does not check for the pre-generated (sgened) assemblies.This could be either directly in your code, or in other .NET Framework code that does this, such as in a strongly typed ADO.NET Dataset.This is covered in the msdn documentation for XmlSerializer if you look at the "Dynamically Generated Assemblies" section http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx

If this is indeed the problem, then the easiest way to fix this is to modify your code to instead use one of the constructors that does check for a pre-generated XmlSerializer assembly.This might be more difficult if it is not your code that is directly calling the XmlSerializer constructor.If you can include the full callstack of the error message you shared below and a snippet of the code where the XmlSerialization is happening, I should be able to help you fix it.

Steven

|||Hi Steven,

Thanks for getting back to me in such a short time.
I was playing with it last night and finally got it working.
My types aren't complex, I only use strings within my assembly (as it is a sms service)
What I did eventually do to fix it was to remove the post build script and set the "Generate Serialization Assembly" on the build tab of the project properties to ON.
It seems that using the sgen tool, the serialization assembly wasn't generated exactly the way that the CLR required it.

I found this website to be very useful in the end:
http://www.u2u.be/Article.aspx?ART=WebServicesinSQL05

Regards,
O'Connor

|||

Hello Steven,

I am currently facing exactly the same strange problem as the initiator of this thread. I want to call a simple webservice from a stored procedure in SQL 2005. I've already tried the different ways of getting the serializer assemblies (using sgen and the build option in VS 2005). I also registered both assemblies one after another in in my SQL 2005 database. The db is trustworthy, assemblies are both marked with "external_access".

But I keep getting the Dynamic Load exception. In your previous post you said you could help if you have the full callstack; here it is...

Msg 6522, Level 16, State 1, Procedure CreateNotification, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'CreateNotification':
System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. > System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.

System.IO.FileLoadException:
at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection)
at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.Code
...
System.InvalidOperationException:
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, compilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
at MAN.Applications.HFIF.Database.ClrExtensions.WebServiceSoapClient..ctor(String ...

How can I change the behaviour of my soap client class to use a particular XmlSerializer constructor that checks for pre-generated assemblies? Could you please give me a hint?

Thanks very much for your help. Frank

Consuming Web Services from the SQL CLR

Hi there,

I've been following Vineets and David's procedures to consume web

services using SQL CLR to the t. I created my web service in C#.NET

2005, and generated my proxy using this command:


wsdl /par:oldwsdlconfig.xml /o:ExactMobileService.cs /n:Project360.SmsService http://www.exactmobile.co.za/interactive/interactivewebservice.asmx

I added both files to the project, set Generate Serialization Assembly to on and compiled it.
I then generated a strong name key for the assembly and signed my assembly with that key.
Inside my post-build event I added the following script:


"E:\Development\Microsoft

Visual Studio 8\SDK\v2.0\Bin\sgen.exe" /force

/compiler:/keyfile:SmsServiceKey.snk /t:StoredProcedures

$(TargetDir)$(TargetName).dll


This compiled into my assembly, the XmlSerializer assembly and then added strong name key to both.


In SQL Server 2005, I enabled CLR, made my DB trustworthy, created my

first assembly with permissions EXTERNAL ACCESS and then the

XmlSerializer assembly with permissions SAFE. I created my stored

procedure and ran it. When I did I got this error which I assumed the

XmlSerializer was supposed to solve for me:

System.InvalidOperationException:

Cannot load dynamically generated serialization assembly. In some

hosting environments assembly load functionality is restricted,

consider using pre-generated serializer. Please see inner exception for

more information. > System.IO.FileLoadException: LoadFrom(),

LoadFile(), Load(byte[]) and LoadModule() have been disabled by the

host.

I have seen alot of posts about this error, but none of them has been able to solve my problem.

Please can you help me?

O'Connor

Hi O'Connor,

As you have experienced, there are a few cases where sgen does not solve the problem of dynamically loading the XmlSerializer assembly.There is usually always a possible workaround, but it can vary depending on exactly what your code is doing.I was intending on writing some more blog posts about solutions to these dynamic assembly loading problems, but haven't had the time to finish them yet.

The problem you're most likely hitting is that the code doing the XmlSerialization uses an XmlSerializer constructor that does not check for the pre-generated (sgened) assemblies.This could be either directly in your code, or in other .NET Framework code that does this, such as in a strongly typed ADO.NET Dataset.This is covered in the msdn documentation for XmlSerializer if you look at the "Dynamically Generated Assemblies" section http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx

If this is indeed the problem, then the easiest way to fix this is to modify your code to instead use one of the constructors that does check for a pre-generated XmlSerializer assembly.This might be more difficult if it is not your code that is directly calling the XmlSerializer constructor.If you can include the full callstack of the error message you shared below and a snippet of the code where the XmlSerialization is happening, I should be able to help you fix it.

Steven

|||Hi Steven,

Thanks for getting back to me in such a short time.
I was playing with it last night and finally got it working.
My types aren't complex, I only use strings within my assembly (as it is a sms service)
What I did eventually do to fix it was to remove the post build script and set the "Generate Serialization Assembly" on the build tab of the project properties to ON.
It seems that using the sgen tool, the serialization assembly wasn't generated exactly the way that the CLR required it.

I found this website to be very useful in the end:
http://www.u2u.be/Article.aspx?ART=WebServicesinSQL05

Regards,
O'Connor

|||

Hello Steven,

I am currently facing exactly the same strange problem as the initiator of this thread. I want to call a simple webservice from a stored procedure in SQL 2005. I've already tried the different ways of getting the serializer assemblies (using sgen and the build option in VS 2005). I also registered both assemblies one after another in in my SQL 2005 database. The db is trustworthy, assemblies are both marked with "external_access".

But I keep getting the Dynamic Load exception. In your previous post you said you could help if you have the full callstack; here it is...

Msg 6522, Level 16, State 1, Procedure CreateNotification, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'CreateNotification':
System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. > System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.

System.IO.FileLoadException:
at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection)
at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.Code
...
System.InvalidOperationException:
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, compilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
at MAN.Applications.HFIF.Database.ClrExtensions.WebServiceSoapClient..ctor(String ...

How can I change the behaviour of my soap client class to use a particular XmlSerializer constructor that checks for pre-generated assemblies? Could you please give me a hint?

Thanks very much for your help. Frank

Consuming Error Output from a Derived column component

Hi,

I have created a program that imports a csv into the sql server. but during that import I need to track all the errors that occured for some malformed rows. I think I need to use the error output collection of the dataflow components to track the errors. I figured out that every dataflow component has a error output collection along with the data output collection. I want to write those error outputs into a separete database. So, I have created a SQL server data destination component and created a path between derived columns error output and it input collection. But it is not working as expected. can any body help on this?

or can anyone give me any example how to use/handle error output collection in SSIS?

I will appreciate all kind of suggestions.

thanks

Why is it not working? Are you receiving any errors? What are those errors?|||

Give more details...

What is the error?

Consuming a Recordset in a Script Transformation

I have a situation where I have created a recordset in a previous data flow task where the output was a recordset.

Now I want to write that recordset to a flat file.

There is no direct recordset input data flow source. So I thought I would use a source script transformation to read the recordset. Then I searched on this and found no information on how I might do this.

Anyone have any ideas on how to do this in a script transformation?

There are reasons that I would like to do it this way, but if I have to choose another way, well that's life.

Try this -

SSIS Junkie : SSIS: Recordsets instead of raw files
(http://blogs.conchango.com/jamiethomson/archive/2006/01/04/2540.aspx)

By the way I would consider raw files over this, especially if you have a lot of data.

|||

DarrenSQLIS wrote:

Try this -

SSIS Junkie : SSIS: Recordsets instead of raw files
(http://blogs.conchango.com/jamiethomson/archive/2006/01/04/2540.aspx)

By the way I would consider raw files over this, especially if you have a lot of data.

I echo what Darren has said. And if you need proof, go here:

Comparing performance of a raw file against a recordset destination
http://blogs.conchango.com/jamiethomson/archive/2006/06/28/4159.aspx

-Jamie

Consume Connection from Report Explorer Web Part

Hello!
I am writing a custom report viewer that I would like to work with the
Report Explorer web part in SP2.
I created my consumer web part and it is connected to the Report Explorer
but it does not seem to ever receive any data from the Report Explorer. Is
the Report Viewer web part the only web part that can consume the information
provided by the Report Explorer?
TIA!
BrianHi Brian,
Welcome to use MSDN Managed Newsgroup!
From your description, my understanding of this issue is: you want to write
the consumer web part to connect to the Report Explorer Web part. If I
misunderstood your concern, please feel free to point it out.
Based on my knowledge, the Report Explorer Web Part and the Report Viewer
Web Part use the technical "Connectable Web Part to handle the connections
between them. So if you want to customize your web part to connect to the
Report Explorer, you need to implement the ICellConsumer interface.
Here is a article talk about the technical "Connectable Web Part" and there
is the sample code for how to implement the interface.
Creating a Connectable Web Part
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/htm
l/CreateConnectableWP_SV01003714.asp
Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting
Services Service Pack 2
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/webrssp2.mspx
#EIAA
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Michael.
Thanks for the post.
Let me be a bit more specific. I already wrote a test web part implementing
the ICellConsumer interface.
When I connect it to the Report Explorer, the Cell that I get is an empty
string.
Actually, the CellReady method only seems to be called when the page loads.
Clicking on folders and reports in the Report Explorer does not seem to pass
any information to my web part. It passes something to the Report Viewer when
it is on the same page since instead of opening a new window to display a
report, the Report Viewer displays the report.
--
Take care,
Brian
"Michael Cheng [MSFT]" wrote:
> Hi Brian,
> Welcome to use MSDN Managed Newsgroup!
> From your description, my understanding of this issue is: you want to write
> the consumer web part to connect to the Report Explorer Web part. If I
> misunderstood your concern, please feel free to point it out.
> Based on my knowledge, the Report Explorer Web Part and the Report Viewer
> Web Part use the technical "Connectable Web Part to handle the connections
> between them. So if you want to customize your web part to connect to the
> Report Explorer, you need to implement the ICellConsumer interface.
> Here is a article talk about the technical "Connectable Web Part" and there
> is the sample code for how to implement the interface.
> Creating a Connectable Web Part
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/htm
> l/CreateConnectableWP_SV01003714.asp
> Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting
> Services Service Pack 2
> http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/webrssp2.mspx
> #EIAA
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Brain,
In the Report Explorer Web part, it pass the ReportUrl in the cell variable
in the cellReadyArgs passed in the CellReady EventHandler. And the Report
Viewer get it in the CellReady event. This event fire handled all by Web
Part architecture, and in you scenario, it seems the Report Explorer and
your own Web Part do not connected correctly, you may try to debug the SPS
session to see what these 2 Web Part really does.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Tuesday, February 14, 2012

constraints implemented in Triggers and replication

Hi Friends,
I have some problems with my merge replication because i have the
constraints created with Erwin implemented in triggers not like foreign
keys, i'm looking for a tool or strategy for converting this constraints to
FK's.
Please help.
Hi Paul,
My problem is in my merge replication. I have'nt Foreign Keys in then BD,
when the replication run, the insert or update or delete statment cause error
because dont have a order of insertion or update or delete because in our
application we have a order.
think you.
Please help.
"Paul Ibison" wrote:

> What problems are you seeing from the triggers? If you
> don't want them to fire as a result of the replication
> process, you can specify NOT FOR REPLICATION on the
> trigger definition. If the problem is that the triggers
> are causing recursion, you can investigate
> sp_check_for_sync_trigger.
> HTH,
> Paul Ibison (SQL Server MVP)
>
>
|||Chouaib,
using NOT FOR REPLICATION in the trigger definition will
mean that the triggers which you have to check
Referential Integrity will not fire during the
replication process. This would seem to fix your issue?
Rgds,
Paul Ibison (SQL Server MVP)
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||thank you paul,
i try that but i have more that one thousands of triggers.
regards.
"Paul Ibison" wrote:

> Chouaib,
> using NOT FOR REPLICATION in the trigger definition will
> mean that the triggers which you have to check
> Referential Integrity will not fire during the
> replication process. This would seem to fix your issue?
> Rgds,
> Paul Ibison (SQL Server MVP)
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||If you script them out into a single file using EM, you
might be asble to replace 'AS' with 'NOT FOR REPLICATION
AS' then run the script.
Rgds,
Paul Ibison (SQL Server MVP)
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||THANK YOU PAUL'
I DO THAT.
"Paul Ibison" wrote:

> If you script them out into a single file using EM, you
> might be asble to replace 'AS' with 'NOT FOR REPLICATION
> AS' then run the script.
> Rgds,
> Paul Ibison (SQL Server MVP)
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>