informix C_ISAM ??
Posted in 1995
Topics: General Discussion
I am using informix C_ISAM library retrieve records via secondary Key. This isam file is 25 bytes for each record, Primary Key offset is 0, length is 25 bytes, Secondary Key offset is 12 bytes, length is 7 bytes. My key descriptor as follows : struct keydesc key ; char in[25] ; key.k_flags = ISDUPS; key.k_nparts = 1; key.k_part[0].kp_start = 12 ; key.k_part[0].kp_leng = 7 ; key.k_part[0].kp_type = CHARTYPE ; memcpy(in, "0840211", 7) ; if(isstart(fd,&pkey,0,&in,ISGTEQ) != 0) { printf("\\nstart read error <NO> %d\\n", iserrno) ; } if (isread(fd,&in,ISNEXT) == -1) { printf("\\nread current data error <NO> %d\\n",iserrno) ; return ; } There are four records match this second key but I can't retieve one of them. Is there anything with my key descriptor declaration or my syntax ? Any help or comments are welcome ... Thank in advance.