using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace SHNDecrypt
{
public class SQLConv
{
public static string GetSQLType(Type type)
{
if (type == typeof(byte))
{
return "TINYINT(1)";
}
else if(type == typeof(SByte)){
return "TINYINT(1) UNSIGNED";
}
else if (type == typeof(UInt32))
{
return "INT(11) UNSIGNED";
}
else if (type == typeof(ushort))
{
return "SMALLINT(5) UNSIGNED";
}
else if (type == typeof(Single))
{
return "FLOAT(10)";
}
else if (type == typeof(Int16))
{
return "SMALLINT(5)";
}
else if (type == typeof(Int32))
{
return "INT(11)";
}
else
{
return "TEXT";
}
}
public static string CreateHeader(string name, bool drop)
{
string toret = "";
if(drop) toret += "DROP TABLE IF EXISTS `" + name + "`;\r\n";
toret += "CREATE TABLE `" + name + "` (";
return toret;
}
public static string GetPrefix(Type type)
{
string toret = "";
if (type == typeof(string)) toret = "'";
return toret;
}
public static string InsterInto(string table, DataColumnCollection columns)
{
string to ="";
to += "INSERT INTO `" + table + "` (";
for (int i = 0; i < columns.Count; i++)
{
to += "`" + columns[i].Caption + "`";
if (i + 1 != columns.Count) to += ",";
}
to += ") VALUES \r\n";
return to;
}
}
}
Denke es ist offensichtlich... zum einen macht er " statt ' ..
Aber hier mal ein Converter der paar Jahre alt ist von einem mysql Projekt..
Habe auch irgendwo einen mssql Converter, aber auf die schnelle ka wo der liegt.
Wenn du mal 1zu1 meinen code übernimmst solltest du 0 fehler haben.
Versuch ausserdem mal anstatt
Code:
INSERT INTO dItemInfo (ID,InxName,Name,Type,Class,MaxLot,Equip,ItemAuctionGroup,TwoHand,AtkSpeed,DemandLv,Grade,MinWC,MaxWC,AC,MinMA,MaxMA,MR,WCRate,MARate,ACRate,MRRate,CriRate,CriMinWc,CriMaxWc,CriMinMa,CriMaxMa,CrlTB,MaxHP,MaxSP,MaxAP,WhoEquip,BuyPrice,SellPrice,BuyFame,BuyGToken,BuyGBCoin,WeaponType,ArmorType,UpLimit,UpSucRatio,UpLuckRatio,UpResource,BasicUpInx,AddUpInx,TH,TB,ShieldAC,HitRatePlus,EvaRatePlus,MACriPlus,CriDamPlus,MagCriDamPlus,BT_Inx,TitleName,ItemGradeType,ItemUseSkill,SetItemIndex,ItemFunc,AutoMon) VALUES
(0,"LeatherBoots","Leather Boots",0,8,1,21,19,0,1000,2,1,0,0,2,0,0,0,1000,1000,1000,1000,0,0,0,0,0,0,0,0,0,62,13,2,0,0,0,0,1,9,0,0,0,60,0,0,1,0,0,0,0,0,0,0,"-",2,"-","-",0,0),
es in
Code:
INSERT INTO dbo.dItemInfo (ID,InxName,Name,Type,Class,MaxLot,Equip,ItemAuctionGroup,TwoHand,AtkSpeed,DemandLv,Grade,MinWC,MaxWC,AC,MinMA,MaxMA,MR,WCRate,MARate,ACRate,MRRate,CriRate,CriMinWc,CriMaxWc,CriMinMa,CriMaxMa,CrlTB,MaxHP,MaxSP,MaxAP,WhoEquip,BuyPrice,SellPrice,BuyFame,BuyGToken,BuyGBCoin,WeaponType,ArmorType,UpLimit,UpSucRatio,UpLuckRatio,UpResource,BasicUpInx,AddUpInx,TH,TB,ShieldAC,HitRatePlus,EvaRatePlus,MACriPlus,CriDamPlus,MagCriDamPlus,BT_Inx,TitleName,ItemGradeType,ItemUseSkill,SetItemIndex,ItemFunc,AutoMon) VALUES
(0,'LeatherBoots','Leather Boots',0,8,1,21,19,0,1000,2,1,0,0,2,0,0,0,1000,1000,1000,1000,0,0,0,0,0,0,0,0,0,62,13,2,0,0,0,0,1,9,0,0,0,60,0,0,1,0,0,0,0,0,0,0,'-',2,'-','-',0,0)
zu ändern
die tabelle dItemInfo muss natürlich auch vorher angelegt sein jedoch sagt dein fehler aus, dass keine Spalte namens LeatherBoots existiert, was steht sonst noch in deinem Query?
Bitte alles bis zum (inklusive des) ersten "INSERT" Posten
Quote:
Originally Posted by EpicFight
Wahrscheinlich nutzt du den SHN Editor von MrFr irgendwas, da ist der Source Code ja so:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace SHNDecrypt
{
public class SQLConv
{
public static string GetSQLType(Type type)
{
if (type == typeof(byte))
{
return "TINYINT(1)";
}
else if(type == typeof(SByte)){
return "TINYINT(1) UNSIGNED";
}
else if (type == typeof(UInt32))
{
return "INT(11) UNSIGNED";
}
else if (type == typeof(ushort))
{
return "SMALLINT(5) UNSIGNED";
}
else if (type == typeof(Single))
{
return "FLOAT(10)";
}
else if (type == typeof(Int16))
{
return "SMALLINT(5)";
}
else if (type == typeof(Int32))
{
return "INT(11)";
}
else
{
return "TEXT";
}
}
public static string CreateHeader(string name, bool drop)
{
string toret = "";
if(drop) toret += "DROP TABLE IF EXISTS `" + name + "`;\r\n";
toret += "CREATE TABLE `" + name + "` (";
return toret;
}
public static string GetPrefix(Type type)
{
string toret = "";
if (type == typeof(string)) toret = "'";
return toret;
}
public static string InsterInto(string table, DataColumnCollection columns)
{
string to ="";
to += "INSERT INTO `" + table + "` (";
for (int i = 0; i < columns.Count; i++)
{
to += "`" + columns[i].Caption + "`";
if (i + 1 != columns.Count) to += ",";
}
to += ") VALUES \r\n";
return to;
}
}
}
Denke es ist offensichtlich... zum einen macht er " statt ' ..
Aber hier mal ein Converter der paar Jahre alt ist von einem mysql Projekt..
Habe auch irgendwo einen mssql Converter, aber auf die schnelle ka wo der liegt.
p.s. vermutlich liegt der hier:
Problem dabei, meistens beziehen sich Online converter ebenso auf aktuelle Versionen.
[Release][Query] Query _InvCOS Items WITH _Char Connection 12/29/2015 - SRO PServer Guides & Releases - 1 Replies Ok, so i needed to write this query for a procedure im working on and not many people know how to connect the pet inventory table to the character table.... so this query will explain how its done...
im not going to explain every single detail, like how there is no charcos when pet is despawned / dead... but yea you can probably figure that all out from this query...
The code...
USE
SELECT pet_invo.
,pet_invo. PetSlot
[Suche]Query für "Alteklinge, Reichsklinge" &' Stichdolche NUR QUERY! 08/18/2010 - Metin2 Private Server - 1 Replies Ich weiß ich werd nervig aber ich suche die Query's
für Alteklinge, Reichsklinge &' Strichdolche
Why?
Naya, weil ich in der DB i-wie nur Drachenmaulglocke hab
... not more -.-
Auf jeden Fall Icon's etc. etc. etc. hab ich ich brauche nur die Query's