texture binding fails

Did anybody have texture binding problem while using CUDA 2.3?
My code is as follows:

texture<unsigned char, 2, cudaReadModeNormalizedFloat> myTex;
cudaArray * g_myTex_array;
unsigned int g_w;
unsigned int g_h;


cudaChannelFormatDesc U8Tex = cudaCreateChannelDesc();
cudaMallocArray(&g_myTex_array, &U8Tex, g_w, g_h);


CUDA_SAFE_CALL(cudaBindTextureToArray(myTex, g_myTex_array));

The last line throws “Cuda error in file test.cu in line 103 : Invalid argument” error message while executing; code compiles fine. I am using Vista, Visual Studio 2008, and Geforce 8600GT.

Really appreciate any suggesssion.

Never mind, the problem was somewhere else.
Thanks for your attention though.