- Joined
- Dec 1, 2010
- Messages
- 28
- Reaction score
- 8
Last edited:
dafuq.
This could be made in PHP with far less effort.
Code:String.Format("INSERT INTO KeyStorage (Email, Hash, isUsed) VALUES ('" + @emailAddr + "', '" + @stringArray + "', 0)");
String.Format("INSERT INTO KeyStorage (Email, Hash, isUsed) VALUES ('{0}', '{1}', 0)", emailAddr, stringArray);
-- should have SqlCommand instead of var (as noted above) and then you should use paramaterized queries to run this.Code:var sqlComm = new SqlCommand(sqlStr, DataConn.Connect());
cmd.Parameters.Add(new SqlParameter("@email", System.Data.SqlDbType.VarChar, 50)).Value = emailAddr;
cmd.Parameters.Add(new SqlParameter("@hash", System.Data.SqlDbType.VarChar, 50)).Value = stringArray;
Code:sqlComm.ExecuteNonQuery();
if (sqlComm.ExecuteNonQuery() == 1)
Code:String.Format(@"Data Source=.\SQLEXPRESS;AttachDbFilename="+ HttpContext.Current.Server.MapPath("~") +@"\App_Data\Database.mdf;Integrated Security=True;User Instance=True");
String.Format(@"Data Source=.\SQLEXPRESS;AttachDbFilename={0}\App_Data\Database.mdf;Integrated Security=True;User Instance=True", HttpContext.Current.Server.MapPath("~"));
sqlComm.Parameters.Add(new SqlParameter("@email", System.Data.SqlDbType.VarChar, 50)).Value = emailAddr;
sqlComm.Parameters.Add(new SqlParameter("@hash", System.Data.SqlDbType.VarChar, 50)).Value = stringArray;
(thumbsup), appreciate the advice man, I definitely need it!
So why dont you click the like button then?
...Just saying
Said (thumbsup), not (like).
Thas why.
= thanksappreciate the advice man, I definitely need it
Of course. Companies still pay a lot of money for people who can make ASP pages.True, but that's not the point. He wanted to do it his way, which turned out to be with C#. Nothing wrong with that.
Of course. Companies still pay a lot of money for people who can make ASP pages.
Its a pretty neat system regardless.
Hey guys. I fixes up the app, and made a better tutorial in the [Tutorial] Section.
Wow! Very nice! You should provide a tutorial or source code :O!