Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 05:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help]Converting DWORD To SQL Bigint

Discussion on [Help]Converting DWORD To SQL Bigint within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2012
Posts: 23
Received Thanks: 1
[Help]Converting DWORD To SQL Bigint

hey,
how can i convert c++ DWORD to sql server bigint? or how else can i save DWORD in sql server?
robobot is offline  
Old 05/09/2012, 08:31   #2
 
Tyrar's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,637
Received Thanks: 1,119
Code:
std::stringstream ss;
DWORD dwValue=1337;

ss << "INSERT INTO dwordtable VALUES (" << dwValue << ");";

mysql_query(p_mysql,ss.str().c_str());
Tyrar is offline  
Thanks
1 User
Old 05/09/2012, 09:23   #3
 
EXTEЯNAL's Avatar
 
elite*gold: 105
Join Date: Jul 2007
Posts: 737
Received Thanks: 114
Code:
DWORD dwMyVal = 0x12345678;
char szSqlQuery[128];
sprintf_s(szSqlQuery, 128, "INSERT INTO dwordtable VALUES (%i);", dwMyVal);
mysql_query(handle, szSqlQuery);
EXTEЯNAL is offline  
Thanks
1 User
Old 05/09/2012, 12:45   #4
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
MoepMeep is offline  
Thanks
1 User
Old 05/10/2012, 02:39   #5
 
elite*gold: 0
Join Date: May 2012
Posts: 23
Received Thanks: 1
thanks very much for your answers

Quote:
Originally Posted by Momo5000 View Post
Code:
DWORD dwMyVal = 0x12345678;
char szSqlQuery[128];
sprintf_s(szSqlQuery, 128, "INSERT INTO dwordtable VALUES (%i);", dwMyVal);
mysql_query(handle, szSqlQuery);
so this does work even if the dwMyVal DWORD is a hex value as example 0xF7DC21A9?
robobot is offline  
Old 05/10/2012, 15:29   #6
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Quote:
Originally Posted by robobot View Post
thanks very much for your answers



so this does work even if the dwMyVal DWORD is a hex value as example 0xF7DC21A9?
Did you even read my post?

0xF7DC21A9 = 4158398889

Why shouldn't it work? ;o
MoepMeep is offline  
Reply


Similar Threads Similar Threads
(DWORD*) *(DWORD*) Frage
04/30/2012 - C/C++ - 3 Replies
Könntet ihr mir bitte einmal erklären was das: DWORD* ViTableStart; DWORD source; ViTableStart = (DWORD*) *(DWORD*)(source); macht? Soweit ich das sehe ist das ein typecast. Nur warum (DWORD*) *(DWORD*)? Wo ist der Unterschied zu:
void (__cdecl *)(int)' in 'DWORD
03/01/2012 - C/C++ - 10 Replies
Hey e*pvpers, Ich habe gerade mit C++ angefangen. Nun wollte ich einen Timer machen, in den man die Zeit eingibt und der dann diese Zeit abwartet(Sleep) und danach den Warnton(\a) ausgibt. Dies hier ist mein Code: #include <iostream> #include <string> #include <windows.h>
[Frage] DWORD zu CString
10/15/2011 - Flyff Private Server - 3 Replies
Hey, hab da mal eine Frage undzwar würde ich gerne eine DWORD Variable (m_pFocusItem->dwLevel) in einen CString konvertieren, habe auch schon gegoogelt, verstehe das mit sprintf() allerdings nicht so richtig >.< MFG Yakuzai.
*(Hot*)(DWORD WhcLabs)(D3D,PlantAnyWhere,SNS,Teleport).......... ......
06/25/2011 - WarRock Hacks, Bots, Cheats & Exploits - 15 Replies
Status : Undetected Version : 1.1 Screen: http://img232.imageshack.us/img232/2425/whcl.png Uploaded with ImageShack.us Virustotal
word,dword,float...
05/04/2009 - Private Server - 0 Replies
Hi I wanted to ask what is the lenght in bytes of: word,dword,qword,float,string,ustring?



All times are GMT +1. The time now is 05:09.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.