本文整理汇总了C#中Mono.Data.Sqlite.SqliteDataReader.GetInt64方法的典型用法代码示例。如果您正苦于以下问题:C# SqliteDataReader.GetInt64方法的具体用法?C# SqliteDataReader.GetInt64怎么用?C# SqliteDataReader.GetInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Data.Sqlite.SqliteDataReader
的用法示例。
在下文中一共展示了SqliteDataReader.GetInt64方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetUserDefineData
//.........这里部分代码省略.........
}
}
} else {
var temp = sql.Split(new String[]{"select"},StringSplitOptions.RemoveEmptyEntries);
var temp1 = temp [0];
var temp2 = temp1.Split (new String[]{"from"},StringSplitOptions.RemoveEmptyEntries);
var temp3 = temp2 [0].Split (',');
int leng_t3 = temp3.Length;
for (int c=0;c<leng_t3;c++){
tablehead [c] = temp3 [c];
}
}
}else{
//update of delete
if (sql.Contains ("update")) {
reader = ExecuteQuery (sql);
throw new Exception ("update affected "+reader.RecordsAffected+" rows");
} else if(sql.Contains("delete")){
reader = ExecuteQuery (sql);
throw new Exception ("delete affected "+ reader.RecordsAffected +" rows");
}else if (sql.Contains("insert")){
//insert
Exception e= null;
try{
ExecuteQuery(sql,false);
}catch(Exception e1){
e = e1;
throw e;
}finally{
if (e == null) {
throw new Exception ("insert success!");
}
}
}else if (sql.Contains("create")){
//create
Exception e = null;
try{
ExecuteQuery(sql,false);
}catch(Exception e2){
e = e2;
throw e;
}finally{
if (e == null) {
throw new Exception ("create new table success!");
}
}
}else if (sql.Contains("drop")){
Exception e = null;
try{
ExecuteQuery(sql,false);
}catch(Exception e3){
e = e3;
throw e;
}finally{
if(e == null){
throw new Exception ("drop table success!");
}
}
}
}
//get user self define data
getDbData = new Hashtable();
//table head
reader = ExecuteQuery (sql);
if (reader.HasRows){
int i = 0;
while(reader.Read()){
Hashtable temp = new Hashtable ();
for (int j =0;j<reader.FieldCount;j++){
Type t =reader.GetFieldType (j);
if(t == typeof(Int32)){
var val = reader.GetInt32 (j);
temp [j] = val;
}
if (t == typeof(Int64)) {
var val = reader.GetInt64 (j);
temp [j] = val;
}
if (t == typeof(Double)) {
var val = reader.GetFloat (j);
temp [j] = val;
}
if (t == typeof(String)) {
var val = reader.GetString (j);
temp [j] = val;
}
}
getDbData.Add (i, temp);
i++;
}
}
GameWorld.getInstance ().errorData.PushTextTable (tablehead);
return getDbData;
}