|
You last visited: Today at 05:08
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.
05/09/2012, 01:01
|
#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?
|
|
|
05/09/2012, 08:31
|
#2
|
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());
|
|
|
05/09/2012, 09:23
|
#3
|
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);
|
|
|
05/09/2012, 12:45
|
#4
|
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
|
|
|
|
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
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?
|
|
|
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
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
|
|
|
 |
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.
|
|