티스토리 뷰

반응형

우...써글....4일동안 웹서치만 하는게 다였는데....

결국 연결해서 자료 뽑아왔다....

문제는 결과물 정렬시키는거....





간단히 ASP.NET에서 연결하는 방법


using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Reflection;

using Zoom.Net.YazSharp;
using Zoom.Net;
using NUnit.Framework;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string contentemp = "";
            IConnection conn = new Connection("z3950.loc.gov", 7090);
            IPrefixQuery query = new PrefixQuery("@attr 1=4 the");

            conn.DatabaseName = "Voyager";

            IResultSet resset = conn.Search(query);

//IScanSet scanset = conn.Scan(query);
           
    for(int i = 0; i < resset.Size && i < 10; i++){
        IRecord record = resset[i];
        RecordSyntax syntax = record.Syntax;
        string content = Encoding.ASCII.GetString(record.Content);
        int size = content.Length;
        contentemp = contentemp + "            여기서는 다른거!!! :"+content; 
    }

    TextBox1.Text = contentemp;
}
catch (Zoom.Net.ZoomImplementationException eexx)
{
    TextBox1.Text = eexx.ToString();
}

       }

}

반응형
공지사항