PDA

View Full Version : Ifilter For Sql 2005


absalom60
April 14th, 2008, 12:48 PM
I am attempting to set up the IFILTER for SQL 2005 and according to the manual
you should be able to set up a web page via the code below. however I have not been able to get this to work correctly -- has anyone been successful in doing this?


using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
public void OnUpload(Object sender, EventArgs e)

{
//Create a byte[] from input file
int len = File1.PostedFile.ContentLength;
byte[] PdfText=new byte[len];
File1.PostedFile.InputStream.Read(PDFText, 0, len);
//Insert the Image and Comment into the database
SQLConnection connection = new
SQLConnection(@"server=xxxx;database=Sxxxx;uid=xx;pwd=xxxx");
try
{
connection.Open();
SQLCommand cmd = new SqlCommand("insert into pdf" + "(PdfText, PdfId, Ext) values (@PdfText, @PdfId, @Ext)",connection);
//insert values into three colums.
cmd.Parameters.Add("@PdfText", PdfText);
cmd.Parameters.Add("@Pdfid". 1);//Only upload 1 PDF at a time
cmd.Parameters.Add("@Ext", ".pdf");
cmd.ExecuteNonQuery();
}
finally
{
Connection.Close();
}
}

AmyLin
April 15th, 2008, 11:03 PM
It just a method to test whether the Foxit PDF IFilter work fine in you SQL server 2005.

emily
June 1st, 2009, 02:01 AM
Hello Helma,
I think SQL Server 2005 Analysis Services Filter webpart is also support excel services. About your problem, please to contact Microsoft, you can get the better reply by this way.
Emily

Logityler
July 5th, 2009, 12:42 PM
An ability to execute scripts is put into MS SQL Server syntax. So you can just write a script through ; and execute it. This method can be used for all scripts except CREATE PROCEDURE - this query always must be the first in the script.

> detach and attach

Try to close a connection, change parameters and re-connect