GL_CLAMP Issues

For some reason I cannot get GL_CLAMP (or GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER, i’ve used others…) to work properly. I always see a black line at the top of the texture.
I’ve tried it on a GF3, a GF2, and even on a Riva TNT2 (which incidentally had the least amount of CLAMPing problems). I’ve specified clamping before each and every call of glTexImage and Build2DMipmap.
I’m suspecting this is a Nvidia driver problem, has anyone had this persisting problem? can u share how you fixed it?

I’ll post my code soon

Appreciate any and all help, thanks

Here’s the code I’m using:

glBindTexture(GL_TEXTURE_2D, texid);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, lWidthPixels, lHeightPixels, GL_RGBA, GL_UNSIGNED_BYTE, pBits);

again, thanks 4 the help

Is the black line only on the top or all around the texture?

If you change the border color, do the color changes accordingly?