Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Monday, March 19, 2012

.txt file to SQL Server 2005

My package inserts a text file into a database table. It first deletes the table rows, reseeds identity to 0 then inserts data from a .txt file.

Runs fine in development. When the package is run on the live server, it appears to have trouble connecting. I've checked the connection strings and they should be fine.

Error: An OLE DB error has occurred. Error code: 0x8000FFFF
Error: The AcquireConnection metod call to the connection manager "MyServer.MyDB" failed with error code 0x8000FFFF

Any suggestions?Issue resolved: it didn't occur to me until now that I needed to change the configuration Data Source to "localhost" once it was on the server!!! Works like a charm now! My first SSIS pkg installed and working, now to create a job to run it each morning...the adventure continues.

Sunday, March 11, 2012

.rdlc reports - add values through textbox name?

hi all

have a .rdlc report like an invoice.

how can i add the values in my textboxes by the Name property of the Text Box.

like txtSubTotal.Text + txtTax.Text + txtShipping.Text. ?

all those fields are populated with calculations that run on the dataset and all have values. I just cant seem to write the proper syntax to add by control names, rather than field names.

well youshould use this syntax

ReportItems!txtSubTotal.Value + ReportItems!txtTax.Value + ReportItems!txtShipping.Value

NB: this wouldn't work whih agregiate functions unless used in a header or footer

Hope this help

|||

Yes I couldn't for the LIFE OF ME find any information on the

ReportItems! < identifier. AFter much searching i found it buried in a MSDN doc somewhere called "The 5 Elements of a Microsoft Report"

Anyways got it working fine now.

thanks,

mcm

|||

hi

Please tell me how to add Runtime value into Report.rdlc. I have two date(for start & end date) Controls on web page. I want to display those date on Report.rdlc using c#.

thanking you in advance

|||

here is a code fragment that could help you :

List<ReportParameter> par=new List<ReportParameter>();ReportParameter p=newReportParameter("saleid","43660");par.Add(p);this.reportViewer1.ServerReport.SetParameters(par);this.reportViewer1.RefreshReport();
Hope this helps

Friday, February 24, 2012

.doc iFilter not working for Mobile docs

Hi,
I have implemented full text searching over files stored in a varbinary(max)
field and this works great
The only issue i am now having is that users creating office documents
created on a Windows Mobile device such as word docs are not being searched.
The extension is .doc but the files look cut down in size.
Does anyone know of a filter or filter update that will also search office
type files created on a Windows Mobile device?
Thanks,
Jeff
The iFilters are specific for document type. The PocketWord application does
not save it in a format that the Office iFilter can understand. You would be
better off to convert them to Word.
"Jeff" <Jeff@.discussions.microsoft.com> wrote in message
news:87EE86C3-0B73-4F23-B1C2-FCB85A15DF5B@.microsoft.com...
> Hi,
> I have implemented full text searching over files stored in a
> varbinary(max)
> field and this works great
> The only issue i am now having is that users creating office documents
> created on a Windows Mobile device such as word docs are not being
> searched.
> The extension is .doc but the files look cut down in size.
> Does anyone know of a filter or filter update that will also search office
> type files created on a Windows Mobile device?
> Thanks,
> Jeff
|||Hi Hilary,
Thanks for your answer.
What I find strange is that the device saves the document with the extension
..doc, but is not a true word document format. So when I check the file
extension with the supported SQL iFilter extensions I get a match and save it
in the db for indexing and searching.
How would I go about programaticaly converting the uploaded docs from the
mobile devices to the full Office document standard supported by the Office
iFilter?
Thanks for your help,
Jeff
"Hilary Cotter" wrote:

> The iFilters are specific for document type. The PocketWord application does
> not save it in a format that the Office iFilter can understand. You would be
> better off to convert them to Word.
> "Jeff" <Jeff@.discussions.microsoft.com> wrote in message
> news:87EE86C3-0B73-4F23-B1C2-FCB85A15DF5B@.microsoft.com...
>
>
|||You would have to use Word to convert the files to the Office Word document
format as opposed to the Pocket Word format.
"Jeff" <Jeff@.discussions.microsoft.com> wrote in message
news:20A3F7E8-C0C6-490A-B555-EAD7931C62E0@.microsoft.com...[vbcol=seagreen]
> Hi Hilary,
> Thanks for your answer.
> What I find strange is that the device saves the document with the
> extension
> .doc, but is not a true word document format. So when I check the file
> extension with the supported SQL iFilter extensions I get a match and save
> it
> in the db for indexing and searching.
> How would I go about programaticaly converting the uploaded docs from the
> mobile devices to the full Office document standard supported by the
> Office
> iFilter?
> Thanks for your help,
> Jeff
> "Hilary Cotter" wrote:

Sunday, February 19, 2012

...is null or not an object error

I am working in html/asp within VisInterDev 6.0. Everything was working fine until I moved a text box from one page to another. I took it from within a form on one page to a form on another (and made the necessary changes in the two pages).

Here is the code that is generating the error:

<body onload="java script:eventreg3.dist.focus();">

However I am using syntactically indentical code on other pages that work fine so I know the problem is not with that line.

It appears that it is not able to find the "dist" text box, but I have been over and over the html and can't find an issue. If I take that line out (keeping the <body> of course) it doesn't generate an error but my submit button doesn't work.

I have also noted that VisInterDev appears to eliminate, or not put in, double quotes around tag attributes. For instance, size="2" appears as size=2. I thought the double quotes were a requirement?

ANy help here? Thanks a ton!!!could it be the space between java and script?

rudy|||but that wasn't it. That space didn't actually exist in the code itself. Sorry for wasting your time. I have no idea what the deal is.

Thursday, February 16, 2012

*.sql

I want to setup a weblog and I us .Text for it. It includes several .sql files and they are there for making my database (I think). How can I execute them so they make my database?? Thanks, Roelif the db is sql server, you can run the sql scripts from the *.sql file in QA...

HTH|||To elaborate further, if you have Query Analyzer, you can do a File...Open...and open the .SQL file. This will open up the script in a readable format. Then you do Query...Execute to run it.

If you do not have Query Analyzer, you can use the command-line OSQL utility.

osql -S (local) -E -i c:\SQLScript.sql

Terri|||If I do so then there are no tables created but there are stored procedures made. Is this okay??

Roel|||Well, the stored procedure won't be able to run without the tables being there, so no, in that sense it is not OK. But both QA and OSQL will let you create the stored procedures without the tables.

How are you planning on creating the tables? Didn't they supply scripts for that, too?

Terri|||I don't know. I think you must create tables wich match witch the stored procedures. But I will go with my question to the .Text department of this forum. Thanx

*.msg files cannot be searched in SQL 2005 without extended MAPI

Hello,

I have a table where I store *.msg files. I wanted to use full text search capability within SQL 2005 to search within the *.msg files for its content. There are filters that I can use to do that.

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

But, there is a problem - the problem is that for any of these filters to work one needs extended MAPI on the SQL Server Box.

This is highly undesirable to any DBA as the only way to install extended MAPI on a box is to either install the outlook client or an exchange tool.

Any suggestions as to what one can do - whether I am right in the first place regarding extended MAPI? Is there any other way to install it apart from what I have mentioned? Any clues?

Thanks in advance

Anshuman Singh

Have you looked at what is on offer at http://www.indexserverfaq.com/iFilters.htm

**longest text in SQL**

Hi
I'm working with SQL 2000 and I want to know what data type is suitable
for long texts and what's the limit for its length?
Any help would be thankful.You can use TEXT or NTEXT.
TEXT has a limit of 2GB, but does not support Unicode data. NTEXT has a
limit of 1 GB and can support Unicode data.
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
<R> wrote in message news:ops8av5uypmw7tkz@.system109.parskhazar.net...
> Hi
> I'm working with SQL 2000 and I want to know what data type is suitable
> for long texts and what's the limit for its length?
> Any help would be thankful.|||varchar(8000) can hold 8000 bytes and can be used in string functions
text can hold 2GB but can only be a variable by being a parameter on a
stored procedure/function and can only be used in certain string functions
and cannot be assigned.
nvarchar(4000) holds 4000 bytes and is unicode.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
<R> wrote in message news:ops8av5uypmw7tkz@.system109.parskhazar.net...
> Hi
> I'm working with SQL 2000 and I want to know what data type is suitable
> for long texts and what's the limit for its length?
> Any help would be thankful.|||text datatype takes 2GB of data. If 8k is enough go with the varchar or char
datatypes.
MC
<R> wrote in message news:ops8av5uypmw7tkz@.system109.parskhazar.net...
> Hi
> I'm working with SQL 2000 and I want to know what data type is suitable
> for long texts and what's the limit for its length?
> Any help would be thankful.

Saturday, February 11, 2012

(Urgent) How Get a Text Field and put the result into a text Var

Hi All

Iam trying to Get a text field value i wrote this code

DECLARE @.ptrval varbinary(16)
DECLARE @.length bigint
SELECT @.ptrval = TEXTPTR(Template), @.length = LEN(Template)
FROM #TEMPLATE
READTEXT Template.#TEMPLATE @.ptrval 0 @.length

but i need to put the result into a text var
is that possible or not and if it possible any one could help me with thatYou could return a text column as part of a result set. Are you trying to get the text back to ASP.NET?

Thursday, February 9, 2012

(Select All) value

I would like to display "ALL" in a text box if the (Select All) option is
selected as a parameter.
I can display 1, 2, 5 to every single selected value in the textbox using
the JOIN function. But if the (Select All) parameter is selected, I would
rather display "All" in my textbox instead of 50+ parameters.
I have tried something of the following
=IIf(Parameters!param.Value = "Select All" , "All",
Join(Parameters!param.Value, " | "))
But this does not work.
Any suggestions out there?
Thanks
RobRob,
I have an idea, but I don't know how good it is...
If there is a way to count the number of values selected, you could
compare that with a count of the records in the dataset. However, since
I don't know if that is possible, here is an idea...
You are using a dataset to generate the "Available Values" for one
parameter. Use this same dataset as the default value for a new,
internal parameter. This parameter will not be used for anything other
than holding all of the values that could be selected.
Then, use an expression to compare the 2 JOIN results.
Iif(JOIN(Parameters!mainParm.Value,",") =JOIN(Parameters!internalParm.Value,","), "All",
JOIN(Parameters!mainParm.Value,",") )
Hope this helps!
-Josh
Rob wrote:
> I would like to display "ALL" in a text box if the (Select All) option is
> selected as a parameter.
> I can display 1, 2, 5 to every single selected value in the textbox using
> the JOIN function. But if the (Select All) parameter is selected, I would
> rather display "All" in my textbox instead of 50+ parameters.
> I have tried something of the following
> =IIf(Parameters!param.Value = "Select All" , "All",
> Join(Parameters!param.Value, " | "))
> But this does not work.
> Any suggestions out there?
> Thanks
> Rob|||Ok, I figured it out and I wanted to put my solution here for others in the
same boat.
Problem: In SSRS 2005 (non SP1) there is the Multi-value option for a
parameter. If you want to display the parameter list in a text box, you use
something like:
=Join(Parameters!param_mso.Label, ", ") //this goes in textbox
and (m.mso_num IN (@.param_mso)) //this goes in the query
This will display every select parameter in a textbox. But what happens if
you have 100+ parameters? Then you have an unmanageable list of parameters
being displayed on the report.
So, if the user selects (Select All) from the dropdown list, only display
"All" in the textbox.
Solution: You need to create a new dataset that only returns the row count
of the parameter list. So, for example: this is the SQL query that returns a
list of MSO objects that are associated with a NETWORK parameter
SELECT s.network_id, ms.mso_num, m.mso_name
FROM service s, mso_service ms, mso m
WHERE s.service_id = ms.service_id
and ms.mso_num = m.mso_num
and s.network_id = @.param_network
GROUP BY s.network_id, ms.mso_num, m.mso_name
ORDER BY ms.mso_num
I create a new DATASET just to get the count of the above query:
SELECT count(*)
FROM(
SELECT s.network_id, ms.mso_num, m.mso_name
FROM service s, mso_service ms, mso m
WHERE s.service_id = ms.service_id
and ms.mso_num = m.mso_num
and s.network_id = :param_network
GROUP BY s.network_id, ms.mso_num, m.mso_name
ORDER BY ms.mso_num)x
This way I know the max number of row items that the original query is going
to return. I then use the following formula in my textbox:
=IIf(Parameters!param_mso.Count = Parameters!param_count.Value, "ALL",
Join(Parameters!param_mso.Label, ", "))
So if the count of my MSO parameter equals the total count of the query,
then display "ALL", otherwise display all of the parameters selected.
I hope that this helps out.
Rob
"Josh" wrote:
> Rob,
> I have an idea, but I don't know how good it is...
> If there is a way to count the number of values selected, you could
> compare that with a count of the records in the dataset. However, since
> I don't know if that is possible, here is an idea...
> You are using a dataset to generate the "Available Values" for one
> parameter. Use this same dataset as the default value for a new,
> internal parameter. This parameter will not be used for anything other
> than holding all of the values that could be selected.
> Then, use an expression to compare the 2 JOIN results.
> Iif(JOIN(Parameters!mainParm.Value,",") => JOIN(Parameters!internalParm.Value,","), "All",
> JOIN(Parameters!mainParm.Value,",") )
> Hope this helps!
> -Josh
>
> Rob wrote:
> > I would like to display "ALL" in a text box if the (Select All) option is
> > selected as a parameter.
> >
> > I can display 1, 2, 5 to every single selected value in the textbox using
> > the JOIN function. But if the (Select All) parameter is selected, I would
> > rather display "All" in my textbox instead of 50+ parameters.
> >
> > I have tried something of the following
> >
> > =IIf(Parameters!param.Value = "Select All" , "All",
> > Join(Parameters!param.Value, " | "))
> >
> > But this does not work.
> >
> > Any suggestions out there?
> >
> > Thanks
> > Rob
>|||You can just use Count(Fieldname, "Dataset") to retrieve the number instead
of creating a seperate dataset.
"Rob" wrote:
> Ok, I figured it out and I wanted to put my solution here for others in the
> same boat.
> Problem: In SSRS 2005 (non SP1) there is the Multi-value option for a
> parameter. If you want to display the parameter list in a text box, you use
> something like:
> =Join(Parameters!param_mso.Label, ", ") //this goes in textbox
> and (m.mso_num IN (@.param_mso)) //this goes in the query
> This will display every select parameter in a textbox. But what happens if
> you have 100+ parameters? Then you have an unmanageable list of parameters
> being displayed on the report.
> So, if the user selects (Select All) from the dropdown list, only display
> "All" in the textbox.
> Solution: You need to create a new dataset that only returns the row count
> of the parameter list. So, for example: this is the SQL query that returns a
> list of MSO objects that are associated with a NETWORK parameter
> SELECT s.network_id, ms.mso_num, m.mso_name
> FROM service s, mso_service ms, mso m
> WHERE s.service_id = ms.service_id
> and ms.mso_num = m.mso_num
> and s.network_id = @.param_network
> GROUP BY s.network_id, ms.mso_num, m.mso_name
> ORDER BY ms.mso_num
> I create a new DATASET just to get the count of the above query:
> SELECT count(*)
> FROM(
> SELECT s.network_id, ms.mso_num, m.mso_name
> FROM service s, mso_service ms, mso m
> WHERE s.service_id = ms.service_id
> and ms.mso_num = m.mso_num
> and s.network_id = :param_network
> GROUP BY s.network_id, ms.mso_num, m.mso_name
> ORDER BY ms.mso_num)x
> This way I know the max number of row items that the original query is going
> to return. I then use the following formula in my textbox:
> =IIf(Parameters!param_mso.Count = Parameters!param_count.Value, "ALL",
> Join(Parameters!param_mso.Label, ", "))
> So if the count of my MSO parameter equals the total count of the query,
> then display "ALL", otherwise display all of the parameters selected.
> I hope that this helps out.
> Rob
>
>
> "Josh" wrote:
> >
> > Rob,
> >
> > I have an idea, but I don't know how good it is...
> >
> > If there is a way to count the number of values selected, you could
> > compare that with a count of the records in the dataset. However, since
> > I don't know if that is possible, here is an idea...
> >
> > You are using a dataset to generate the "Available Values" for one
> > parameter. Use this same dataset as the default value for a new,
> > internal parameter. This parameter will not be used for anything other
> > than holding all of the values that could be selected.
> >
> > Then, use an expression to compare the 2 JOIN results.
> > Iif(JOIN(Parameters!mainParm.Value,",") => > JOIN(Parameters!internalParm.Value,","), "All",
> > JOIN(Parameters!mainParm.Value,",") )
> >
> > Hope this helps!
> >
> > -Josh
> >
> >
> > Rob wrote:
> > > I would like to display "ALL" in a text box if the (Select All) option is
> > > selected as a parameter.
> > >
> > > I can display 1, 2, 5 to every single selected value in the textbox using
> > > the JOIN function. But if the (Select All) parameter is selected, I would
> > > rather display "All" in my textbox instead of 50+ parameters.
> > >
> > > I have tried something of the following
> > >
> > > =IIf(Parameters!param.Value = "Select All" , "All",
> > > Join(Parameters!param.Value, " | "))
> > >
> > > But this does not work.
> > >
> > > Any suggestions out there?
> > >
> > > Thanks
> > > Rob
> >
> >|||Won't let me edit my post. Something like this.
=IIF(Count(Fields!AcctCode.Value, "AcctCode") =Parameters!AcctCode.Count,"All",Join(Parameters!AcctCode.Label,","))
"Rob" wrote:
> I would like to display "ALL" in a text box if the (Select All) option is
> selected as a parameter.
> I can display 1, 2, 5 to every single selected value in the textbox using
> the JOIN function. But if the (Select All) parameter is selected, I would
> rather display "All" in my textbox instead of 50+ parameters.
> I have tried something of the following
> =IIf(Parameters!param.Value = "Select All" , "All",
> Join(Parameters!param.Value, " | "))
> But this does not work.
> Any suggestions out there?
> Thanks
> Rob