|
-
Nov 26th, 2000, 05:25 PM
#1
Thread Starter
Lively Member
using an SQL Statment to insert a new record into my database
how would i add the contents of my text1 textbox to my database called TESTERSQL and fieldname "Test"
thanks
im learning sql querys at the moment can any one tell me as well where there are good sql tutorials!!!
-
Nov 26th, 2000, 08:07 PM
#2
_______
<?>
The following example opens the employee table and adds one record.
USE employee
INSERT INTO employee (emp_no, fname, lname, officeno) ;
VALUES (3022, "John", "Smith", 2101)
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 26th, 2000, 09:10 PM
#3
Fanatic Member
Use INSERT INTO ....blablabla....
The statement is :
From VB :
If Text1 content is a Text
Code:
Dim myConn as New ADODB.Connection
myConn.Open "your connection string open"
myConn.Execute "INSERT INTO TESTERSQL(Test) " _
& "select '" & Trim(Text1.Text) & "'"
If Text1 content is a value
Code:
Dim myConn as New ADODB.Connection
myConn.Open "your connection string open"
myConn.Execute "INSERT INTO TESTERSQL(Test) " _
& "select " & Trim(Text1.Text) & ""
I hope it will help...
Cheers,
Wen Lie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|