ok so far this is my problem: I am building a SIMPLE insert record page on ASP.
I have already a db with only one table with only two fields id and name. what I want is a simple webform where I can insert data... but I am restricted from using any html code or whatsoever but the *.aspx.vb scripts. I just want the code.. how would you do? oh and btw please dont refer another tutorials webpages cuz I've already searched and they just explain it quickly
ok thanks but this is what I have in code:
Imports System.Data
Imports System.Data.OleDb
**button code
Dim ciudadcodigo As String
Dim ciudadnombre As String
ciudadcodigo = txciudadcodigo.ToString()
ciudadnombre = txciudadnombre.ToString()
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Willmer Barahona\Mis documentos\Visual Studio 2008\WebSites\WebSite1\App_Data\db1.mdf")
Dim SQL As String
SQL = "Insert into ciudad (ciudadid, ciudadnombre) values ('" & ciudadcodigo & "', '" & ciudadnombre & "')"
Dim objCmd As New OleDbCommand(SQL, conn)
conn.Open()
btw im latin so the fields on the table are in spanish nevermind, I do have two textboxes from wich the user will insert data and the button executes the sql commands, but now it pops an error says: Couln't use "; the file is already on use
WTH? thats why I hate VS and so I love Genexus... can you tell me whats wrong? damn Im sick of this! :S
I have already a db with only one table with only two fields id and name. what I want is a simple webform where I can insert data... but I am restricted from using any html code or whatsoever but the *.aspx.vb scripts. I just want the code.. how would you do? oh and btw please dont refer another tutorials webpages cuz I've already searched and they just explain it quickly
ok thanks but this is what I have in code:
Imports System.Data
Imports System.Data.OleDb
**button code
Dim ciudadcodigo As String
Dim ciudadnombre As String
ciudadcodigo = txciudadcodigo.ToString()
ciudadnombre = txciudadnombre.ToString()
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Willmer Barahona\Mis documentos\Visual Studio 2008\WebSites\WebSite1\App_Data\db1.mdf")
Dim SQL As String
SQL = "Insert into ciudad (ciudadid, ciudadnombre) values ('" & ciudadcodigo & "', '" & ciudadnombre & "')"
Dim objCmd As New OleDbCommand(SQL, conn)
conn.Open()
btw im latin so the fields on the table are in spanish nevermind, I do have two textboxes from wich the user will insert data and the button executes the sql commands, but now it pops an error says: Couln't use "; the file is already on use
WTH? thats why I hate VS and so I love Genexus... can you tell me whats wrong? damn Im sick of this! :S