Basically,i' m working on an assignment for to develop an SQL database-Web front End but anyway i don't really have an experience with asp ,it's why i need a support for to finish it.
I have tried to develop some code ,you can take a look on it:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
connect_string = "Driver={SQL Server};Server=myServer;Database=computer;Uid=scan ners;Pwd=bertrand;"
set dbConn = Server.createObject ("ADODB.connection")
dbConn.open connect_string
mySQL ="select * from EMPLOYEE,DEPARTMENT,SCANNER,TECHNICALDESCR WHERE EMPLOYEE.emplNO=SCANNER.emplNO AND EMPLOYEE.dprtNo=DEPARTMENT.dprtNO AND SCANNER.scandescr=TECHNICALDESCR.scandescr"
set result=dbConn.execute(mySQL)
If result.eof then
response.write "There are no records."
Else
Do while NOT result.eof
Response.write result("EMPLNO")
Response.write result("EMPLNAME")
Response.write result("EMPLSTARTDATE")
Response.write result("EMPLSTATUS")
Response.write result("DPRTNO")
Response.write result("SCANNO")
Response.write result("SCANDESCR")
Response.write result("DOCUMENT")
Response.write result("FILES")
Response.write result("DPRTNAME")
Response.write result("DPRTLOCATION")
Response.write "<br>"
result.MoveNext
Loop
End if
result.Close
Set result =Nothing
dbConn.Close
Set dbConn = Nothing
%>
Although it's run well now, i would like then to insert values
(for ex.:
INSERT INTO EMPLOYEE VALUES (140,'MICHAELLU',to_date('2006/01/31','yyyy/mm/dd'),NULL,3);
INSERT INTO EMPLOYEE VALUES (141,'FAROUKHP',to_date('2006/01/31','yyyy/mm/dd'),NULL,11)
However i don't know a good way for to add it?
Thanks really for your attention.
Best regards,
Bazubwabo J.B.
IT student
1 1392
Basically,i' m working on an assignment for to develop an SQL database-Web front End but anyway i don't really have an experience with asp ,it's why i need a support for to finish it.
I have tried to develop some code ,you can take a look on it:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
connect_string = "Driver={SQL Server};Server=myServer;Database=computer;Uid=scan ners;Pwd=bertrand;"
set dbConn = Server.createObject ("ADODB.connection")
dbConn.open connect_string
mySQL ="select * from EMPLOYEE,DEPARTMENT,SCANNER,TECHNICALDESCR WHERE EMPLOYEE.emplNO=SCANNER.emplNO AND EMPLOYEE.dprtNo=DEPARTMENT.dprtNO AND SCANNER.scandescr=TECHNICALDESCR.scandescr"
set result=dbConn.execute(mySQL)
If result.eof then
response.write "There are no records."
Else
Do while NOT result.eof
Response.write result("EMPLNO")
Response.write result("EMPLNAME")
Response.write result("EMPLSTARTDATE")
Response.write result("EMPLSTATUS")
Response.write result("DPRTNO")
Response.write result("SCANNO")
Response.write result("SCANDESCR")
Response.write result("DOCUMENT")
Response.write result("FILES")
Response.write result("DPRTNAME")
Response.write result("DPRTLOCATION")
Response.write "<br>"
result.MoveNext
Loop
End if
result.Close
Set result =Nothing
dbConn.Close
Set dbConn = Nothing
%>
Although it's run well now, i would like then to insert values
(for ex.:
INSERT INTO EMPLOYEE VALUES (140,'MICHAELLU',to_date('2006/01/31','yyyy/mm/dd'),NULL,3);
INSERT INTO EMPLOYEE VALUES (141,'FAROUKHP',to_date('2006/01/31','yyyy/mm/dd'),NULL,11)
However i don't know a good way for to add it?
Thanks really for your attention.
Best regards,
Bazubwabo J.B.
IT student
Hi there,
Kindly refer to below attached link for further reading & understanding, hope it helps. Good luck & Take care. Insert/add data into database Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bart Nessux |
last post by:
The below code works well, except for the database insert. I want each
element of the array to be inserted into the database, but only the last
element of the array is inserted... all the elements...
|
by: PT |
last post by:
I got a problem. And thats.....
First of all, I got these three tables.
------------------- ------------------ ----------------------
tblPerson tblPersonSoftware ...
|
by: george |
last post by:
This is like the bug from hell. It is kind of hard to explain, so
please bear with me.
Background Info: SQL Server 7.0, on an NT box, Active Server pages
with Javascript, using ADO objects.
...
|
by: Danko Greiner |
last post by:
I'm trying to update every table in DataSet, but getting inserted "id_user"
gets me an exception:
column "id_user" is read only
if(_dataSet.HasChanges())
{
SqlDataAdapter _adapter;...
|
by: serge |
last post by:
When i debug a trigger is it possible to add a WATCH
on the INSERTED or DELETED?
I think not, at least I couldn't figure out a way to do so.
Does someone have a suggestion on how I can see the...
|
by: satish |
last post by:
hi,
i have inserted the image present in mydocuments using alter command
create table aa(a int, d image)
insert into aa values (1,'F:\prudhvi\baba 002.jpg')
when i do
select * from aa
i...
|
by: Kev |
last post by:
Hello world,
I am trying to capture the latest entry into a text box by the user
and then insert it in a separate text box. I must not be searching the
right key words because I can only find...
|
by: sanano3062000 |
last post by:
HI i have inserted values into list box control using java script when i try to save the values in to data base values of list box control are lost..
This is called as lost of list box values on...
|
by: fig000 |
last post by:
Hi,
I'm using an objectdatasource. The insert procedure called by the
objectdatasource is in a separate library file outside of the aspx and
the codebehind that is using the objectdatasource in...
|
by: MESLarochelle |
last post by:
I am trying to update a field of a newly inserted record by using an
insert trigger. For example:
Table has 3 fields:
MyTable:
ID (int, Identity), Integer1(int), Integer2(int)
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |