Re: [Linux-programlama] mysql C kullanim sorunu

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Emre Turkay (emreturkay.tr@gmail.com)
Date: Tue 16 Jan 2007 - 21:49:24 GMT


Merhaba,

Sorun kullandiginiz buffer'in tasmasi olabilir. Derlenebilir bir kod
ornegi gonderebilirseniz deneyebilir.

Emre Turkay

On Tue, Jan 16, 2007 at 03:32:45PM +0200, Mustafa Kutsal Ay wrote:
> merhaba,
>
> C ve mysql ile ilgili basit bir sorunum var.
> ic ice iki tane sql query yuruttugum ve ikinci result set`e ulasmak istedigim zaman `Segmentation fault` hatasi aliyorum calisma sirasinda.
>
> hatanin olustugu yer, while`in icindeki result set`i fetch etmek istedigim satir. (row_qmgr) ile baslayan satir.
>
>
> result set`e mysql_use_result`la degil mysql_store_result`la ulasitigim halde ve farkli `res` pointerlari kullandigim halde ve derleme asamasinda sorun olmadigi halde yine de bu hatalari aliyorum.
>
> ilgilenen arkadaslara tesekkurler.
>
>
>
> sprintf(qBuff0,"SELECT ............ ;");
>
> mysql_query(conn, qBuff0);
> res_smtp=mysql_store_result(conn);
>
> while (row_smtp = mysql_fetch_row(res_smtp))
> {
> sprintf(qBuff0,"SELECT ...... ;",row_smtp[0]);
>
> mysql_query(conn, qBuff0);
> res_qmgr=mysql_store_result(conn);
>
> row_qmgr= mysql_fetch_row(res_qmgr);
>
> printf("%s\n",row_qmgr[0]);
>
> mysql_free_result(res_qmgr);
>
> }
>
> mysql_free_result(res_smtp);
>
>
>
>
>
>

> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.