Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Friday, March 23, 2012

GAC issues with my C# app

not sure if this is an SQL issue or a development issue, but as im using c# and visual studio so il place this here for now.

I wrote a small app to script out jobs from sql server. it worked fine, and then , without any changes it stopped working. I got the error:

Could not load type

'Microsoft.SqlServer.Managment.Smo.AgentJobBaseCollection' from assembly 'Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, publicKeyToken=89845dcd8080cc91'.


I checked the version of the Microosft.SqlServer.Managment.Smo Dll installed in sql server installation dir, and its version 9.00.1399.00, so i try to update the gac . The version in the gac is 9.0.242.0. I cannot delete it via the gac MMC plugin as it tells me it is required by another app. I cannot delete it via GacUtil for the same reason. I went to the windows directory to the assemblies folder and tried deleteing it there, but also could not as it is required by another application.

How do i delete the old version from the gac and install the new version?

I was going to try editing the registry, but when i searched for that specific assembly "Microsoft.Sqlserver.Managment.Smo, i find thousands of entries, and i am not editing each one. that would take me days.

Any help would be greatly appriciated.

Probably this might help you PRB: "Could not load type"

|||

afraid not. this is a windows app. nothing to do with asp.

GAC issue

I have .NET 1.1/Visual Studio 2003 and am trying to make the .NET C# code visible in SSIS -- I am a newcomer to GAC and did the following:

Set up a strong-name key pair

Put in the reference to it inside assemblyinfo

Put in PreBuild event to uninstall in GAC and PostBuild to install in GAC

All appeared fine

Set up project in SSIS

Put up Add Reference dialog and looked for project dll -- not there

I see from above something about putting the assembly into c:\windows\framework\... I do not have

a directory "framework" under "windows"

Is there another place I should put the assembly>

It references when I put the assembly in the V 2.0 dir, that is,

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

Note: this is a version 1.1 assembly. Would there be any

problems with just going ahead and doing this?

|||GAC is a runtime thing. Putting the assembly in the appropriate .NET folder allows you to reference it for debugging and intellisense.sql

Sunday, February 26, 2012

Fulltextsearch Error in Userinstance

I've enabled the Fulltextsearch in some Tables of my DB.
In SQL Server Management Studio the querys are all have results and running free of errors.

If i will use the same querys in VWD, they're running in a SqlException. Translated from german:
The Fulltextsearch cant be used in the Userinstance.

But a SelectCommand from the WebSite to the IndexState:
SELECT crawl_end_date FROM sys.fulltext_indexes WHERE fulltext_catalog_id = 10
works fine.

What i'm wrong?

The ConnectionString i'm using:
="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Support.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"

The FulltextService (msftesql.exe) is running under a UserAccount.

Thanx

Klaus

Hi Klaus,

Full Text Search can not be used in a User Instance. If you need the functionality of FTS, you'll need to attach your database to the main instance and connect to that.

Regards,

Mike Wachal
SQL Express team

-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1

|||

Hi Mike,

User Instance is the magic word.

Change my connectionstring like connectionstring.com says and all works fine.

Thanks for the hint to the right way.

Klaus

Full-Text-Search

Hi friends

i work with sql server 2005 express(Management Studio)

can i use full text search service with that edition of sql server?

and how i can use that.

thank u.Smile [:)]

The Full-Text Search feature is not available in SQL Server 2005 Express.

HTH,
Ryan

|||

thank u for ur answering.

so which edition of sql server support that?

|||

fahima wrote:

so which edition of sql server support that?

The Workgroup, Standard, and Enterprise editions all support Full-text Search.

HTH,
Ryan

|||

ok

is it hard to work with service?

|||

fahima wrote:

is it hard to work with service?

Do you mean is it difficult to get Full-text Search to work? I've never played with Full-text Search, but here's an article that should give you a better understanding of it:Understanding SQL Server Full-Text Indexing.

HTH,
Ryan

|||

the Express Edition does in fact have full text search feature available. to get this you need to download a different file, SQL Server with Advance services -http://msdn.microsoft.com/vstudio/express/sql/compare/default.aspx

Not sure if this was released since the last post here - just though i would answer seeing as i was floating around.

regards

Full-Text Setup and Search

Hi,

I have a database developed using SQL Server Management Studio Express with Full-Text searching. I can go into the Object Explorer and right click on my database and choose Properties, select File and the 'Use-full-ext indexing' is checked.

I'm not sure how I create an index for a table, can someone help? I want to create an index for table 'tblLogNotes' and have the following columns:

note_id = (PK, int, not null)
note = (varchar(3000), not null)
log_id = (FK, int, not null)
operatorid = (int, not null)
note_created = (datetime, not null)

I know I did something but not sure what I did, but on one of my tables, when I right click on table and choose 'log_note', I can see that Full-text Specification = yes, (is full-text indexed = yes), full-text type column = <none> and language = English (United States).

Table 'tblLog' has the following columns:
log_id - (PK, int - not null)
log_note (varchar(3000), not null)
tag_number(varchar(50), not null)

However, when I try the following query, I get nothing:

SELECT *
FROM tblLog
WHERE CONTAINS(Log_note, '"pump*"')

I've also tried: 'pump'

What am I doing wrong?

Thanks,

Hi Ed,

You need to create a Full Text Catalog and a Full Text Index before you can query against them. See...

CREATE FULLTEXT CATALOG

CREATE FULLTEXT INDEX

and

The Full Text Overview topic in Books Online.

SSMSE does not enable the Full Text commands for technical reasons, but you can use the Template Explorer to get the basic SQL statements and then just fill in the blanks for your database.

Mike

Friday, February 24, 2012

FullText Search SQLserver2005 using VS2005 Server Explorer

Hello,

I am using SQLServer Express and Visual Studio 2005 to create the website. I would like to implement FullText search, but have never done it before. I have looked at the msdn documentation on FullText search in SQLServer 2005 herehttp://msdn2.microsoft.com/en-us/library/ms142519.aspx.

I cannot seem to figure out how to use a FT search using Visual Studio. Can someone please help me configure my database and then explain how I can run queries based on user input to return data?

Hi KJAK,

KJAK:

I am using SQLServer Express and Visual Studio 2005 to create the website.

In the SQL Express Edition, you have to do some more work the in the other SQL editions.

KJAK:

I cannot seem to figure out how to use a FT search using Visual Studio.

Use the Sql Server Management Studio Express. Open the Template Explorer, select the Full-text folder and select theCreate Full-text Index template. Fill in the needed information and run it. Then select theCreate Full-text Catalog template and do the same.

BTW. Sql-BOL is your friendSmile

|||

What I have now figured out is that I will not be able to implement FULL-TEXT search on this particular site. I am using a shared hosting provider and they do not provide me access via the Sql Server Management Studio Express because they do not permit remote connections. I have some documentation that may help me get around this issue to configure the database, but since the database is provided by the host, it may not work.

I have marked your reply as answered as a way to thank you for your help and will keep this post in mind when I am working with dedicated server websites.

Thanks for your reply!
KJAK

|||

KJAK:

I have some documentation that may help me get around this issue to configure the database, but since the database is provided by the host, it may not work.

Is your DataBase transmitted to the ISP sql server, or its a dynamically attached DataBase in your App_Data folder?

In the second case, AFAIK Full-text search wount works, because you need access to the Fulltext-Catalog directory to populate your index.

|||

The database is located on the hosts network. They provide a client that I connect to in which I can define tables, stored procedures, schema's, et cetera. It does not provide me access to the catalogs and is limited in what I can do all together. I have not yet spoken to the host to see if they can explain how to do it or whether I can do it or not.

|||

KJAK:

It does not provide me access to the catalogs and is limited in what I can do all together.

You may change to a ISP they will give you a dedicated SQL server. Or live with this restrictionsSmile

Full-Text Search Not Finding Suffix

Hello,
This is my first post to MS tech net. I started using SQL Server 2005 and
Visual Studio 2005 YESTERDAY so I am very new to this.
I am implementing a site search and want to use Full-Text search. I have a
small test table with a few columns (all enabled for FTS and I have populated
the catalog).
The problem is when I type in 'word' I do not get 'words' back from the
database, only 'word'. If I type in 'computer' I only get 'computer' and not
'computers' and 'computerized'. If I type in 'computer computers' then I get
both.
I was under the impression that FTS supports prefix searches and even verb
and noun variations. Please someone help me figure out the problem.
I am using: SQL Server 2005, Windows XP Pro, Visual Studio 2005.
My Query:
strSearch = "SELECT icgMenuSectionName FROM icgMenu WHERE FREETEXT(
icgMenuSectionName, @.searchphrase)";
Thank You!
Karina
The problem is probably that you are either using the neutral word breaker,
or you are inadvertently wrapping your search phrase in double quotes which
disables the stemming - stemming is the function which allows you to search
on all generations or a word, i.e. plural, singular, declensions, or
conjugations of a word.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
"Karina" <Karina@.discussions.microsoft.com> wrote in message
news:A25E30E6-0673-4278-B3F4-BEDBB056F7C6@.microsoft.com...
> Hello,
> This is my first post to MS tech net. I started using SQL Server 2005 and
> Visual Studio 2005 YESTERDAY so I am very new to this.
> I am implementing a site search and want to use Full-Text search. I have
> a
> small test table with a few columns (all enabled for FTS and I have
> populated
> the catalog).
> The problem is when I type in 'word' I do not get 'words' back from the
> database, only 'word'. If I type in 'computer' I only get 'computer' and
> not
> 'computers' and 'computerized'. If I type in 'computer computers' then I
> get
> both.
> I was under the impression that FTS supports prefix searches and even verb
> and noun variations. Please someone help me figure out the problem.
> I am using: SQL Server 2005, Windows XP Pro, Visual Studio 2005.
> My Query:
> strSearch = "SELECT icgMenuSectionName FROM icgMenu WHERE FREETEXT(
> icgMenuSectionName, @.searchphrase)";
> Thank You!
> Karina
>
>
>
|||Hilary, thank you for the response. I've read almost every posting you had
in these groups
I did had Neutral set (I set it to English). I don't have double quotes in
the query (I don't think).
This is what I have:
void Button_Click( object s, EventArgs e ) {
SqlConnection conPubs;
string strSearch;
SqlCommand cmdSearch;
SqlDataReader dtrSearch;
conPubs = new
SqlConnection(@."Server=localhost;uid=sa;pwd=stuff; Database=icg" );
strSearch = "SELECT icgMenuSectionName FROM icgMenu WHERE contains(
icgMenuSectionName, @.searchphrase )";
cmdSearch = new SqlCommand( strSearch, conPubs );
cmdSearch.Parameters.Add("@.searchphrase", txtSearchPhrase.Text);
Response.Write(strSearch);
conPubs.Open();
dtrSearch = cmdSearch.ExecuteReader();
while ( dtrSearch.Read())
{
lblResults.Text += "<li>" + dtrSearch[ "icgMenuSectionName" ];
}
conPubs.Close();
}
I've read every post in this newsgroup and tried everything. Any help is
greatly appreciated, I've been at this since Monday night.
Thanks again!
"Hilary Cotter" wrote:

> The problem is probably that you are either using the neutral word breaker,
> or you are inadvertently wrapping your search phrase in double quotes which
> disables the stemming - stemming is the function which allows you to search
> on all generations or a word, i.e. plural, singular, declensions, or
> conjugations of a word.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> 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
>
> "Karina" <Karina@.discussions.microsoft.com> wrote in message
> news:A25E30E6-0673-4278-B3F4-BEDBB056F7C6@.microsoft.com...
>
>
|||Hello,
I'm still searching for help with this issue. It appears that my query
appends double quotes so that it disables the suffix search in FTS service.
How do I make it NOT have the double quotes. When I try to get rid of them,
VS2005 complains, I tried all combinations of quotes with no success. Please
help, I've been stumped all week.
My code:
void Button_Click( object s, EventArgs e ) {
> SqlConnection conPubs;
> string strSearch;
> SqlCommand cmdSearch;
> SqlDataReader dtrSearch;
> conPubs = new
> SqlConnection(@."Server=localhost;uid=sa;pwd=stuff; Database=icg" );
> strSearch = "SELECT icgMenuSectionName FROM icgMenu WHERE contains(
> icgMenuSectionName, @.searchphrase )";
> cmdSearch = new SqlCommand( strSearch, conPubs );
> cmdSearch.Parameters.Add("@.searchphrase", txtSearchPhrase.Text);
> Response.Write(strSearch);
> conPubs.Open();
> dtrSearch = cmdSearch.ExecuteReader();
>
> while ( dtrSearch.Read())
> {
> lblResults.Text += "<li>" + dtrSearch[ "icgMenuSectionName" ];
> }
>
> conPubs.Close();
> }
"Karina" wrote:
[vbcol=seagreen]
> Hilary, thank you for the response. I've read almost every posting you had
> in these groups
> I did had Neutral set (I set it to English). I don't have double quotes in
> the query (I don't think).
> This is what I have:
>
> I've read every post in this newsgroup and tried everything. Any help is
> greatly appreciated, I've been at this since Monday night.
> Thanks again!
> "Hilary Cotter" wrote: