I am the following. As a user registers his account name and password are put into an existing table. Then his id gets read from that table and another table is made using that id as the tablename.
Now inserting works great but reading the Id from that table seems to give me some problems.
Now it would be great if I was even able to get that id to display on my webpage. i feel like when I am able to do that I can just do something like CREAT TABLE + @Id + etc.
This is what I have so far
var gebruikersnaam = Request.Form["registnaam"];
var wachtwoord = Request.Form["registpassword"];
if (IsPost && Request.Form["registreren"] == "Registreren")
{
var insertCommand = db.Execute("INSERT INTO Accounts (gebruikersnaam, wachtwoord) VALUES(@0, @1)", gebruikersnaam, wachtwoord);
var id = db.Query("SELECT * FROM Accounts WHERE gebruikersnaam = @0", gebruikersnaam);
Response.Write(@id);
}
And this is what the Response.Write(@id)
shows me on the webpage:
System.Collections.ObjectModel.ReadOnlyCollection`1[System.Object]