Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
50
CryptoSource/SQLExecute/NaveServer/NFDBComponent.cpp
Normal file
50
CryptoSource/SQLExecute/NaveServer/NFDBComponent.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
#include <stdio.h>
|
||||
#include "NFDBComponent.h"
|
||||
|
||||
namespace NaveServer {
|
||||
|
||||
NFDBComponent::NFDBComponent(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
NFDBComponent::~NFDBComponent()
|
||||
{
|
||||
}
|
||||
|
||||
bool NFDBComponent::Connect(LPCWSTR szDBServerName, LPCWSTR szDBName,
|
||||
LPCWSTR szDBAccount, LPCWSTR szDBPass,
|
||||
NFOleDB::ConnType connType)
|
||||
{
|
||||
swprintf(m_LastMessage, L"DB<EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD>մϴ<D5B4> : %s, DB : %s, Account : %s, Password : %s", szDBServerName, szDBName, szDBAccount, szDBPass);
|
||||
|
||||
if (!ConnectSQLServer(szDBServerName, szDBName, szDBAccount, szDBPass, connType))
|
||||
{
|
||||
swprintf(m_LastMessage, L"DB Connect failed : %s", GetErrorString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool NFDBComponent::Select(const WCHAR *Query_In, void** lpLoginTable_Out,
|
||||
int Size_In, int StartNum_In, int RowNum_In, int *GetRowNum_Out)
|
||||
{
|
||||
if (StartNum_In == 0 && !ExecuteQuery(Query_In))
|
||||
{
|
||||
swprintf(m_LastMessage, L"Execute DB Query failed : %s", GetErrorString());
|
||||
}
|
||||
else if (!GetData((void **)lpLoginTable_Out, Size_In, RowNum_In, GetRowNum_Out))
|
||||
{
|
||||
swprintf(m_LastMessage, L"Get DBdata failed : %s", GetErrorString());
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user