I miss this place.
Here are snippits i wrote in C#. I would like to know if i can copy/pasting this to a asp.net app and what i may need to change. I am mostly worried that the syntax will be invalid because a compatible library doesn't exist.
struct MediaIdUserIdPair //is there a standard pair i can use?
{
public long mediaId, userId;
};
class Media : Media_Base
{
public long mediaId, auth;
public DateTime currentDate;
public List<MediaIdUserIdPair> derivedFrom, inspiredBy;
public List<string> derivedFromStr, inspiredByStr;
public List<string> inspiredByExt = new List<string>();
};
command.CommandText =
"CREATE TABLE if not exists tag_name( " +
"tagid INTEGER PRIMARY KEY, " +
"title TEXT UNIQUE);";
command.ExecuteNonQuery();
command.CommandText =
"INSERT OR FAIL INTO tag_name(title) VALUES(@title); " +
"SELECT last_insert_rowid() AS RecordID;";
command.Parameters.Add("@title", DbType.String).Value = tag;
long tagid = (long)command.ExecuteScalar();