Saturday, January 30, 2010

Z39.50 Client in C#.Net using Zoom.Net and Yaz.dll

Z39.50 is a client-server protocol for searching and retrieving information from remote computer databases. It is covered by ANSI/NISO standard Z39.50, and ISO standard 23950. The standard's maintenance agency is the Library of Congress. Z39.50 is widely used in library environments and is often incorporated into integrated library systems and personal bibliographic reference software. Interlibrary catalogue searches for interlibrary loan are often implemented with Z39.50 queries.Work on the Z39.50 protocol began in the 1970s, and led to successive versions in 1988, 1992, and 1995. The Common Query Language is based on Z39.50 semantics.

It supports a number of actions, including search, retrieval, sort, and browse. Searches are expressed using attributes, typically from the bib-1 attribute set, which defines six attributes to be used in searches of information on the server computer: use, relation, position, structure, truncation, completeness. The syntax of the Z39.50 protocol allows for very complex queries.

In practice, however, the functional complexity is limited by the uneven implementations by developers and commercial vendors. The syntax of Z39.50 is abstracted from the underlying database structure; for example, if the client specifies an author search (Use attribute 1003), it is up to the server to determine how to map that search to the indexes it has at hand. This allows Z39.50 queries to be formulated without having to know anything about the target database; but it also means that results for the same query can vary widely among different servers. One server may have an author index; another may use its index of personal names, whether they are authors or not; another may have no name index and fall back on its keyword index; and another may have no suitable index and return an error.
 
I have developed a z39.50 client which is based on zoom.net (which in turn uses the YAZ.dll to incorporate the z39.50). The client has been built on c#.net. Here I have used some basic queries of searching via author, title and publisher. Further I have used only AND and OR clauses in the query. The record is being fetched in MARCXML and selected parameters are displayed to user. The application is successfully retrieving data from the loc server whose connection parameters are:

Server name : z3950.loc.gov
Port : 7090
Database : Voyager


You can get the Zoom.Net dll from here [zoom.net dll] and the Yaz.dll from here [Yaz dll]. The support that the above mentioned server gives in regard to query syntax and symantics is described in loc server page. Kindly refer it to know more about the LOC server that I have used to query in the application.
The code for it is :


//namespaces to include
using Zoom.Net.YazSharp;
using Zoom.Net;
using System.Xml;
 
 //create a connection and provide the server details. Here I have used the LOC server
Connection ob1 = new Connection("z3950.loc.gov", 7090);  
//provide the name of the database on the server
ob1.DatabaseName = "Voyager";

//define the syntax type that will be required. Here i am defining XML viz MarcXml
ob1.Syntax = Zoom.Net.RecordSyntax.XML;

//Connect to the server
ob1.Connect();

//Declare your query
query = "Title=\"" + txtTitle.Text.Trim() + "\""; 

//Create the object for query. 
Zoom.Net.YazSharp.CQLQuery q = new CQLQuery(query);

IResultSet results;
//perform search
results = (ResultSet)ob1.Search(q);
 
Now iterate through to the results and get the xml of each record fetched and derive from it the needed values.

for (uint i = 0; i < results.Size; i++)
{
     string temp = Encoding.UTF8.GetString(results[i].Content);
    //This string is having the xml in string format. Convert it into the xml via XmlDocument
    XmlDocument doc = new XmlDocument();
    doc.LoadXml(temp);

   //perform the needful operations
  //............... 
  //...............
  //............... 
}

Hope this helps... Do keep me updated about your views and queries.

A comprehensive and exhaustive list of avaliable z39.50, sru and srw servers is given in indexdata website. Another list having avaliable z39.50 free softwares is in loc website.

134 comments:

  1. Thanks for the update... i'll surely try to do the same in my application. Meanwhile i will try to get to you the list of other z39.50 servers connection url and database name.

    ReplyDelete
  2. Could you upload de sample's files?? =)

    ReplyDelete
  3. Hi friend, i dont know how works the yaz.dll, may you help me?? I need to do a c# z39.50 client, please help me!! :(

    ReplyDelete
  4. For learning more about yaz.dll refer to http://www.indexdata.com/yaz For building a z39.50 client you first need to clear your basics regarding it. more more go to loc site www.loc.gov/z3950

    ReplyDelete
  5. don´t work for me, I tried with VS2008 and Win 7, the line

    Connection ob1 = new Connection("z3950.loc.gov", 7090);

    returns an error, any idea why?

    Could you upload the project files?

    ReplyDelete
  6. Have you added reference to Zoom.Net and Zoom.Net.YazSharp dlls to your application ? This error seems to arise due to this. Also is your system connected to internet?

    ReplyDelete
  7. Thanks for the code. It helped me a lot and is surely working... though i had some problem with xml format.... but i sort it out... keep up the good work !

    ReplyDelete
  8. Hi, Jaivardhan.
    Do you have document of yazsharp ? Can you share me them ? they 're important in my project. Thanks you.

    ReplyDelete
  9. I´m very interesting about z39.50 code, but I have some questions, my msn address is polo8896@hotmail, maybe someone wants to help me.

    ReplyDelete
  10. The short-coming of using yazsharp is that its documentation is non-existent. All the work I have done on it via R&D. I hope the makers of yazsharp come up with its documentation.

    @Paul. You can put up your questions directly here. It may others who are facing the same problem.

    ReplyDelete
  11. Hello!
    You saw a good source. I can not figure out the source of the query syntax.
    If the "select * from where title in ( 'aaa', 'bbb') and isbn = 'ccc'" What happens when you convert to CQLQuery?
    Do not mind if you made "LibCyb Z39.50 Client" program, the source is required.
    Please.
    gingsft@gmail.com

    ReplyDelete
  12. The CQLQuery is currently not supported by the Server name : z3950.loc.gov, Port : 7090, Database : Voyager . Its details can be found on the loc site. To get a server which is supports CQL-query you have to do some searching for avaliable servers

    ReplyDelete
  13. Hello,
    I develop a customer Z3950 and I have a problem to define the options of connections. You tried to apply options on the connection with the library zoom.net ?
    Thanks,

    ReplyDelete
  14. I downloaded the yaz.dll and tried to add it as a reference to my project in Visual studio 2008 but I get the error:
    "A reference to yaz.dll could not be added. Please make sure that the file is accessible and it is a valid assembly or COM component"
    I suppose the yaz.dll is required to build my Z39.50 application.
    What should I do to add the yaz.dll reference??

    ReplyDelete
  15. The yaz.dll is not an .net assembly i.e. it is not written in .net. For implementing it you have to make a wrapper class in .net for it (which would be quite time consuming). I would advice to rather go for zoom.net dll which itself manages the wrapper classes and you can easily add its reference to your .net application. The link for it is given in the article. Hope this helps...

    ReplyDelete
  16. That's right the problem with YAZ.dll is that it is not made in .net so it takes quite an effort to use it with .net. Further i cannot understand why did the development of zoom.net was stopped few years back. It should continue so that the .net developers can benefit and implement the z39.50. If anyone has any new update kindly share.

    ReplyDelete
  17. Thank you for your reply. It really helped me!!
    Now I have another problem. Maybe someone faced it before and can help me.
    I need to perform the search on
    Host platonas.lib.ucy.ac.cy
    Port 210
    Database Name ADVANCE
    but I get the error
    Zoom.Net.Bib1Exception: MalformedQuery
    at the
    results = (ResultSet)ob1.Search(q); line

    Do you have any idea on solving this??

    ReplyDelete
  18. Can you share the exact query. Further I would like to share one main point that everyone misses. The query is specific to the server i.e. how does the server manipulate and parse it varies from server to server. Also the number of query elements (like, and, or, any etc.) that the server might support also vary. So go through the server supported query syntax and tags, which generally are provided by the server admin or help. Hope this helps.

    PS: Kindly share your name, it's kind of awkward to address a reply to "Anonymous". I hope you will understand :)

    ReplyDelete
  19. Thanks Jai for the comments. Really nearly all of us forget his thing and try to seek the same type of query on various servers, not considering if the server support the query (and its elements) or not. I would be regularly visiting your blog for updates. Again thanks and keep up the good work !

    ReplyDelete
  20. Thanks for the answer. I case someone else is having the same problem, I solve it by creating a PrefixQuery and the query to be like "@attr 1=4 xxxx" since the server I was searching on could not understand the CQLQuery -> Title= "xxxx".

    P.S. sorry for the "Anonymous" :)

    ReplyDelete
  21. how do i implement a simple z39.50 server?(1-get client request 2-search in library 3-and return result to client)

    ReplyDelete
  22. Firstly define the parameters for searching that you want to give to the user and the server can process. Then make a good parser that can de-parse the query sent by the user and check it for errors and formatting. After this design a good DB and optimize it for faster query retrieval. Also search accordingly to the search parameters available to user(LIKE, OR, AND , ANY, NOT). Lastly parse the result to be shown to the user as per the format and return the result.

    Hope this helps.

    ReplyDelete
  23. Could you show sample display data to gridview
    thank you.

    ReplyDelete
  24. Thanks Jai for the wonderful post explaining the Z39.50 and how to make its client in .net. Also you gave a good insight on how a server behaves and its properties that most of us usually miss and try to query all the servers with the same type of syntax. Your comment on it really helped me.

    Also your comment on the components of a Z39.50 server brought out some good points that one need to keep in mind while developing it.

    Once again thanks for all the updates and replies. You rock !!!

    Love you !

    ReplyDelete
  25. This is very good topic and helpfull but when I implementing Z39.50 server client in .net there is a problem in connection to the server in loading the yaz.dll. It through exception System.DllNotFoundException : Unable to load yaz.dll. Can you please send me Source Code of this project on my email (anil.kumar.yadav@hotmail.com). It will very helpfull for us. Thanking you.

    ReplyDelete
  26. Hi..
    how can i create z39.50 server in .net.. this is client program..right.?

    ReplyDelete
  27. Quit nice post and it helped a lot ! The problem with yaz is that most work on it is done on open-source languages and very little is in .net. You really have done a tremendous work and thanks for sharing your work ! :)

    ReplyDelete
  28. Hi. I added reference to Zoom.Net and Zoom.Net.YazSharp dlls and I'm connected to the internet. However, I keep getting a "type initializer for 'Zoom.Net.YazSharp.Connection' threw and exception' error. Any help is greatly appreciated.

    ReplyDelete
  29. @Jay Mad it seems that the connection is not being made to the server. First check your connection string properties of the server i.e. Server name, port no. and database etc. Secondly is the server accepting these parameters ? Kindly checkout the server properties and features that it supports. Lastly you have mentioned that you are connected to the server, but at times I have noticed that the firewall or anti-virus also might block the connection being made to the server, do check on this part also.

    Do keep me updated on the outcome.

    ReplyDelete
  30. Really nice post.

    Do you also have any idea for retrieving dublin core xml records using this z39.50 client ? . I think it looks difficult to retrieve dc records since the recordsyntax enumeration does not contain "dc" option.

    ReplyDelete
  31. Dear Joshi
    Have you ever tried to find a term in other languages, for example Arabic? I used the above code, this works fine for non-utf8 terms.

    Could you please tell me what to do if we want to search in other languages?
    amir.parsi@gmail.com
    Thanks

    ReplyDelete
  32. @Amir Parsi, I have tried this code on many Indian languages, like hindi, urdu, punjabi, marathi, tamil, malayalam etc. and it works fine for all of them. So it should work fine for any other language.

    For searching in different languages my recommendation is extensive use of Unicode language. The server as well as the client should be compatible with unicode. By the use of it most of the problems associated with the syntax and semantics of various languages will be solved.

    ReplyDelete
  33. @Faisal... sorry for replying too late. This code also supports Dublin Core. For this just update the following line in the code:

    ob1.Syntax = Zoom.Net.RecordSyntax.DublinCore;

    The latest version of Zoom.Net dll supports this feature.

    ReplyDelete
  34. Dear Jai
    In reply to your Oct.20th,
    unfortunately I don't have access to the server to set it based on unicode. But, I know when I use yaz-client and use utf-8 charset, everything is OK.
    This does not work in vb.net. I found this example in yaz documents:
    @term string "a UTF-8 string, maybe?"

    as a query string for pfq queries. But even this does not work for me.
    I'm really mixed up!
    Amir Parsi

    ReplyDelete
  35. @Amir Parsi I quote the following text

    "Most Z39.50 servers do not support proximity searching, or support only a small subset of the full functionality that can be expressed using the PQF proximity operator. Be aware that the ability to express a query in PQF is no guarantee that any given server will be able to execute it."
    Ref :http://www.indexdata.com/yaz/doc/tools.html

    So kindly first check if the server is supporting PQF queries. Try using some basic CQL queries. Hope this helps...

    ReplyDelete
  36. Je n'arrive pas a trouver une documentation pour la réalisation d'un serveur z39.50 !

    Merci pour votre aide !

    ReplyDelete
  37. Bonjour!
    La documentation de z39.50 serveur est très rare et n'est pas disponible sur l'Internet. Ce n'est que par des recherches et d'expériences sur pouvons le construire.

    Tout le meilleur pour elle!

    ReplyDelete
  38. Ji Jai, tnx for this code, but i'm getting same error as Jay Mad: "type initializer for 'Zoom.Net.YazSharp.Connection' threw and exception"

    Ive tries oter address beside the on you were using, but it always that error do you have suggestions (i've tried without firewall but no help)

    ReplyDelete
  39. Thanks Jai for the code... it worked for me. I had in past just lost hope of connecting to the server but after reading your post I was able to connect. Further your feedback was very helpful. :)

    ReplyDelete
  40. I have a problem. I using windows 7 and VS 2008 (64)
    I copy-paste the code, I added references (Zoom.Net and Zoom.Net.YazSharp) that I downloaded from first link. I copied all files in Bin folder of my project. When application is running, the code:"Connection ob1 = new Connection("z3950.loc.gov", 7090);"

    Send me this error:


    System.TypeInitializationException: The type initializer for 'Zoom.Net.YazSharp.Connection' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'yaz': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
    at Zoom.Net.YazSharp.Yaz.yaz_log_init(Int32 level, String prefix, String name)
    at Zoom.Net.YazSharp.Log.Init(Int32 level, String prefix, String name) in D:\Zoom.Net\Zoom.Net.YazSharp\Log.cs:line 37

    ReplyDelete
  41. Have you added reference to the Zoom.Net.YazSharp dll in your application ? Merely putting it in the bin folder will not work. The error clearly points this out.

    ReplyDelete
  42. Thank you for your quick answer.
    I add Zoom.Net.YazSharp dll to the reference. VS build it, but when it runs send me this error. I think it must be problem with yaz.dll. Do i need to download yaz.dll from second link? Because when i download zoom.net from first link it alredy have yaz.dll?

    ReplyDelete
  43. Thank you for your quick answer.

    I added Zoom.Net.YazSharp in to reference. VS build the program but when it execute it, program send me that error.
    Like I said I copy the code, download zoom.net from first link then I added references to Zoom.Net.YazSharp and Zoom.Net. Do I need to do anything else because the tutorial says that i have to download the yaz.dll but the zoom.net alredy have yaz.dll when I downloaded it?

    ReplyDelete
  44. I crossed checked it. It is working fine ! Also remember that when you download zoom.net you get a bin folder... inside this folder is debug and release folders.

    Now most users make this mistake.. note carefully.

    In case of web application you need to copy all the files inside the debug folder(from downloaded files) to the bin folder of your application.

    In case of window application you need to copy all the files inside the debug folder(from the downloaded files) to the debug folder of your application.

    This is because by default the Visual Studio IDE put all the dll inside the debug folder of bin in case of window application and in the bin folder of web application. There is no debug folder inside the bin in case of web application.

    Hope this helps many !!!

    ReplyDelete
  45. Hi again :)

    I did copy all the files, included them in my project, turned off my firewall, pinged addresses so see if they're alive (and they are :)) but still the same...i'm crazy, always the same error:

    "The type initializer for 'Zoom.Net.YazSharp.Connection' threw an exception."

    with same InnerException:

    "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"

    Does anyone have any idea? It would be much appreciated

    ReplyDelete
  46. After closely examining the error described above I have a new thing to share with all. The zoom.net dll and yaz dll will only work with the x32 operating system and not with x64 operating system. This is so as the dll's are build only for the x32 operating system.

    As of now no x64 supporting version of the dll's is not avaliable. If anyone comes across them kindly share the download link.

    ReplyDelete
  47. I was just logging on to say it worked like a charm for me.. and THANKS.

    That said, it is working for me on Windows 7 64bit machine, without any problem. Not entirely sure why...

    The only issues that I had is that one of my particular Z39.50 servers did not accept CQLQuery, and I had to switch to PrefixQuery, and then try to understand that new query language.

    But, to pull a record by identifier, I used:

    string query = "@attr 1=12 01381152";
    Zoom.Net.YazSharp.PrefixQuery q = new PrefixQuery(query);

    ReplyDelete
  48. @Mark is your OS 64 bit or the hardware is 64 bit?

    ReplyDelete
  49. I downloaded only the Zoom.net download as well, since I saw that Yaz.dll was already present. I did NOT actually drop them into my bin folder though. Although I am using them in a web application (or testing for that) I am referencing them from a class library, so I simply browsed to and added Zoom.net and Zoom.net.yazsharp. Not sure that makes any difference though.

    ReplyDelete
  50. Both are 64-bit. and I am using VS 2008 as well.

    ReplyDelete
  51. Hmm, i'm also using win7 x64 with VS 2008, but no luck, still the same error, well i'll try to find dll's that are supported on x64 machines, if they exist...

    ReplyDelete
  52. @Mark it seems that the VS 2008 is running your application in 32bit mode. That's the only reason why you are able to run the application. Check what is the target machine type in the VS 2008 IDE ("Any CPU" or x32 etc.) in configuration manager.

    As far as the referencing the dlls from class library, it will make no difference.

    ReplyDelete
  53. Hmm, i've tried setting my VS to work in x86 mode, but that didn't help at all, same error keep popping up :(

    Damn, this is killing me :))

    ReplyDelete
  54. Hehehe, i finally managed to make it work, after setting my project Solution Platform to x86, including both files in my project and copying all .dll's from [Zoom.NET folder]\bin\Debug folder to newly generated [Solution Folder]\bin\x86\Debug folder.

    Now i can connect successfully and no more exceptions. :))

    Tnx Jai and everyone for helping!!!

    ReplyDelete
  55. hi

    i'm using Zoom.Net-1.0.2400.win32.Net2.0.50727
    let see this code query = "@attr 1=4 " & Chr(34) & TextEdit1.Text & Chr(34)

    i cannot search title or text with thai language

    anyone have idea?

    ReplyDelete
  56. It was really detailed post. You have pointed out some interesting facts to which I was completely unaware. I am glad that I read your post.

    ReplyDelete
  57. have anybody can search with Unicode query?
    please share the idea.

    thanks

    ReplyDelete
  58. Hi this is a very good topic

    but i do have an error
    Connection could not be made to z3950.loc.gov

    at this line : results = (ResultSet)ob1.Search(q);

    thanks :)

    ReplyDelete
  59. I have performed the search on
    Host z3950.loc.gov
    Port 7090
    Database Name Voyager
    but I get the error
    Zoom.Net.Bib1Exception
    at the
    results = (ResultSet)ob1.Search(q); line

    the same code you are using no changes, i have copied all the files inside the debug folder(from the downloaded files) to the debug folder of my application.

    ReplyDelete
  60. @Dina are you having any firewall or proxy installed in your network. It has been observed that it restricts connection to the LOC server.

    ReplyDelete
  61. hello, is there any place we can find the full code for this? it will be useful for a university project.

    thank you
    Jane

    ReplyDelete
  62. @jai

    thanks alot for your response.
    Yes I use to have a firewall but I have disabled it.

    now I am having a different error message


    Unable to load DLL 'yaz.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    ReplyDelete
  63. @Jai
    Sorry for bothering you
    but i still getting the first error
    but I get the first error after disabling the firewall
    Zoom.Net.Bib1Exception
    at the
    results = (ResultSet)ob1.Search(q); line

    the same code you are using no changes, i have copied all the files inside the debug folder(from the downloaded files) to the debug folder of my application.

    ReplyDelete
  64. for those who get this error
    Unable to load DLL 'yaz.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
    you need to register the yaz.dll using the following command
    regsvr32 "the full path of the library\yaz.dll"
    make sure to place it at the same place with the other dll of the project for the dependency
    Best of luck

    ReplyDelete
  65. master of the mazeJuly 5, 2011 at 12:54 PM

    @Jai
    what about libraries that use USMARC, UKmarc, SUTRS?
    How can i read these formats or convert them to xml format?
    Your reply is very appreciated

    ReplyDelete
  66. @jai
    i wonder about the dublin core i didn't find any update for the zoom.net dll so if you know any refrence please let me know.
    and thank's for your wonderful blog

    ReplyDelete
  67. Hi Jai,

    I use VS 2008 and Win7 32 bit. I add Zoom.Net.YazSharp dll to the reference. VS build it, but when it runs send me this error

    I have similar error above: The type initializer for ‘Zoom.Net.YazSharp.Connection’ threw an exception in line: Connection ob1 = new Connection("z3950.loc.gov", 7090);

    Can you help me again? I tried but it not work.( I copied all the files, included them in my project follow u guide)

    ReplyDelete
  68. @Jai .. thanks for a wonderful and informative article.

    ReplyDelete
  69. when i change the
    Server name : lx2.loc.gov
    Port : 210
    Database : LCDB
    showing error:Zoom.Net.Bib1Exception: UnsupportedUseAttribute

    ReplyDelete
  70. I want to implement z39.50 client using java.Can you give me code for z Client in java?
    What will the requirements for it?
    I do one program but at new time new errors are coming.
    Please help me my email-id ids ashkhote@gmail.com

    ReplyDelete
  71. Thanks Jai for the code. It is working for me and helped me a lot in my college project.

    ReplyDelete
  72. hi sir
    my project is error

    "results = (ResultSet)ob1.Search(q);"

    ReplyDelete
  73. Please help me!!! How to render records in Zoom.net? :(

    ReplyDelete
  74. Thanks Jai for the code. Its working for me :)

    ReplyDelete
  75. Is there a way to search in different languages?
    when i search in Hebrew, i got errors. is it possible to fix that?

    ReplyDelete
    Replies
    1. First of all check if the z39.50 server supports Hebrew language. If yes then try to send the query in unicode. Hope this helps

      Delete
    2. I think the server support Hebrew, since it got Hebrew books in it.

      anyway, how do I send the query in unicode?
      can you show me an example?

      thanks.

      Delete
  76. This comment has been removed by the author.

    ReplyDelete
  77. Ethan can you share the details of the z39.50 server that you are searching ?

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. By the way. I'm using PFQ for my searches which works for English Phrases like i said.

      Delete
  78. Can i use this same code for another server,port,Database?

    ReplyDelete
    Replies
    1. Yes you can, provided the server supports z39.50 protocol.

      Delete
    2. Ok Thank you ,But how can i get that type of Server .I mean i am using visual studio 2010 can you give me that source code to get dynamically z39.50 protocol supporting servers.

      Delete
  79. Hi Jai,
    I am having A dllnotfound exception when I run an application on either Win7-64 bit or Windows server 2008 64-bits, here is the error message I get:
    The type initializer for 'Zoom.Net.YazSharp.Connection' threw an exception.

    Unhandled Exception: System.TypeInitializationException: The type initializer fo
    r 'Zoom.Net.YazSharp.Connection' threw an exception. ---> System.DllNotFoundExce
    ption: Unable to load DLL 'yaz': The specified module could not be found. (Excep
    tion from HRESULT: 0x8007007E)
    at Zoom.Net.YazSharp.Yaz.yaz_log_init(Int32 level, String prefix, String name
    )
    at Zoom.Net.YazSharp.Log.Init(Int32 level, String prefix, String name)
    at Zoom.Net.YazSharp.Connection..cctor()
    --- End of inner exception stack trace ---
    at Zoom.Net.YazSharp.Connection.Finalize()
    The application works fine on WinXp, Any suggestions are much appericited

    ReplyDelete
    Replies
    1. Hi Jai,
      I found the issue, I was missing a dependency dll "msvcr71.dll"
      everything works fine now.
      thanks

      Delete
  80. hi
    how to search record from ISBN i am able to retrieve record from server using ISBN
    Can help me as soon as possible

    ReplyDelete
  81. hi
    how to search record from ISBN i am not able to retrieve record from server using ISBN
    Can help me as soon as possible

    ReplyDelete
  82. I got problem with HRESULT: 0x8007007E and I did fix by change pool in IIS7 to run at 32bits(enabled). We don't have 64 bit dll so iis cannot find that dll. :)

    ReplyDelete
  83. Hi Jay,

    I am trying use z39 via Pazpar2 and yaz if you have any idea, like how can i use with it please share with me. I am looking forward for response from your side

    ReplyDelete
  84. Can I use more than one database for searching with this

    ReplyDelete
  85. Thank you very much. The ZOOM.net package and your sample code work perfect for me. The result set contains 406 records in xml format.

    ReplyDelete
  86. Hi Jay.
    First of all, Thank you for saving me a lot of time.
    I consumed your code in my application and it was working fine on my dev machine. But when I published my application on IIS it was throwing a freaking error.

    Error:
    The type initializer for 'Zoom.Net.YazSharp.Connection' threw an exception.

    Scenerio:
    -Framework: 4.5
    -Language: Vb.net
    -Reference: Added Including all files
    -Running on Development Machine
    -Firewall Status: Off (Tried with both on / off - added port in firewall but nothing works)

    Please Help.

    ReplyDelete
  87. In continuity with my Last Message:

    Scenerio Changed:
    -Framework 4
    -Language: vb.net
    -All References Included
    -Running on Development Machine
    -Devepment Machine: Windows 8 64 bit
    -Throwing Same Error on IIS Windows 8 64 bit but resolved after making App Pool Compatible with 32 bit application.
    -Now I need to push it live on Windows 2008 R2 32 bit but It is throwing the same error.

    ReplyDelete
  88. Hi guy ,
    I want sample z39.5 asp.net server

    ReplyDelete
  89. With the same code as in the example I get the following error when calling new Connection:

    Unable to load DLL 'yaz': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    My Setup:
    Visual Studio 2010
    Tried on both Framework 4 and 2
    Language C# (ASP.NET)
    Operating System: Windows 7 32-bit
    - Included both Zoom.Net and Zoom.Net.YazSharp reference
    - Copied the debug to bin folder
    - I read all the comments here and searched for this error online but no luck

    Not sure if anyone is still following this thread but it would be great if anyone could help me out with this one.

    ReplyDelete
    Replies
    1. I use Windows 8 64 bit and VS2010 and have the same problem as you. Here is the solution that work for me:

      1. Get source code from : http://svn.code.sf.net/p/zoomdotnet/code/trunk
      2. Rebuild
      3. Use dll that was rebuild and everything will be OK :)

      Delete
    2. This is to confirm Zoom.Net.YazSharp package requires a dependency dll "msvcr71.dll" in system folder or application bin folder.

      Delete
  90. anyone plz help me if we use in case of title use isbn no than what column we use
    because existing code for isbn no not working and isbn search both type 10 digit or 13 digit

    ReplyDelete
  91. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

    ReplyDelete
  92. I am getting the below error while executing the 1st line of code
    Unhandled Exception: System.TypeInitializationException: The type initializer fo
    r 'Zoom.Net.YazSharp.Connection' threw an exception. ---> System.DllNotFoundExce
    ption: Unable to load DLL 'yaz': The specified module could not be found. (Excep
    tion from HRESULT: 0x8007007E)

    my system configuration as below
    WINDOWS 7(64bit)
    VS-2012(Ultimate Edition)
    Framwork-3.5

    i want to consume this service in my product either in ASP.NET code or WCF service and what will be the query.

    Please help me out its very urgent.

    Best Regard
    Sinnam S Kushwah

    ReplyDelete
  93. This comment has been removed by the author.

    ReplyDelete
  94. Anyone having solution for using ZOOM.NET and Zoom.Net.YazSharp on 64 Bit Pc with ASP.NET 4.0

    ReplyDelete
  95. I am getting the result in xml format from the code provided. I am reconstructing the result in the way of requirement, but for different records the same tag means different field value. Ex : If search value is "modern physics" then tag no. "710" refers "other authors". where as for search value "biometry" the tag no. "710" refers "subjects". So please help me out from this confliction.

    ReplyDelete
  96. how to make z server form yaz in c#

    ReplyDelete
  97. string query = "Title=\"" + str + "\""; this query provides search only with Title.. Can any one provide the query to search with Author, ISBN, Published ??

    ReplyDelete
  98. Wow! this is an interesting blog. Has anyone got a .Net web service, which I can call. I want to link my LMS web services written in C# with some managed code. I am currently using the YAZ.dll but not with zoom.net.

    I am also looking for a z39.50 server in C#. Has anyone got one?

    ReplyDelete
  99. Very good work. Has anyone had any luck clearing up the "Unable to load DLL 'yaz': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" problem? It seems that there is not clear cut answer in the comment area.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Problem solved. I didn't see the comment underneath. Adding msvcr71.dll did the trick!

      Delete
  100. hi jai, i want to connect all z3950 server but i cannot create common query. i have UnsportedQueryType problem. Help me pls, thanks.

    ReplyDelete
  101. Has anyone used ZOOM to successfully connect to a z3950 server that requires an ID/password? If so, how?

    ReplyDelete
  102. hy sir how are you ?? sir iwant to create an asp.net application for library . i want to get information about the books from the library of congress by giving the tittle of book in a textbox but information of book ie issn publisher and auther will also retrive in textbox or label by clicking button because i want to save the information of book in my database plzzzz help me...

    ReplyDelete
  103. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    Mobile App Developers in India

    ReplyDelete
  104. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's. 
    microsoft azure training in bangalore
    rpa training in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  105. //Declare your query
    query = "Title=\"" + txtTitle.Text.Trim() + "\"";
    please give a sample query instead of txtTitle.Text.Trim()

    ReplyDelete
  106. Could I use this DLL in a windows forms development?

    ReplyDelete
  107. Thank you for the post. I will definitely comeback. data scientist course in surat

    ReplyDelete
  108. This post is so interactive and informative.keep update more information...
    SEO Training in Tambarama
    SEO Training in Chennai

    ReplyDelete
  109. Well, I really appreciated for your great work. This topic submitted by you is helpful and keep sharing...
    Cheap Uncontested Divorce in VA
    Family Lawyer Cost
    Best Family Court Lawyers Near Me

    ReplyDelete
  110. I appreciate your blog, from this session i got good knowledge. I admire your effort in writing valuable blogs. Thanks
    conducción temeraria de virginia
    divorce lawyers in virginia
    abogados de divorcio en virginia

    ReplyDelete
  111. This comment has been removed by the author.

    ReplyDelete

Comments to this post

LinkWithin

Related Posts with Thumbnails