-
Set tblNew_Cycle = db.CreateTableDef(New_Cycle_Name)
-
-
-
'Adding Fields to the Table
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Test_Cycle", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Sno", dbInteger)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Group_Name", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Test_Case", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Result", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Tester", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Date_Tested", dbDate)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("CR", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("CL", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Star_Team_Ref", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Dummy_Notes", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Total_Steps", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Failed_Step", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Original_Tester", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Review_Comments", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Tester_Comments", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Action_Taken", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Bug_Status", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Duplicate", dbText)
-
tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Step_Needing_Clarification", dbText)
-
I created a database table in the above manner. Here New_Cycle_Name is a variable which contains the actual name which the table shld be given.
This code is placed in a loop so every time a new table shld be created with a new name.
Now my problem is
1. How do i insert values into the table using SQL Insert Into command??
I tried it in the following way:
db.Execute ("Insert into tbl_New_Cycle (Test_Cycle,Sno,Group_Name,Test_Case,Tester) values('" & New_Cycle_Name & "','" & no & "', """ & Group_Name & """, """ & Test_Case & """,'" & Tester & "')")
But while running the program i got an error saying that output table "tbl_New_Cycle" not found, This is because the table that is created in the database has a different name ex TC99..
2.Similarly I am not able to query the table for any kind of results because of the table name being different.
Any help will be appreciated. I searched the net a ot for some solution but couldn`t get any.
Thanks
2 1818 tbl_New_Cycle is not the table name that is a variable , so how can you hardcode that one.
try this -
db.Execute ("Insert into" & tbl_New_Cycle & "(Test_Cycle,Sno,Group_Name,Test_Case,Tester) values ('" & New_Cycle_Name & "','" & no & "', """ & Group_Name & """, """ & Test_Case & """,'" & Tester & "')")
-
Hi,
One more correction over here : Field "SNo" is an Integer, so you should not wrap it in single Quotes..:
Check this : -
db.Execute ("Insert into" & tbl_New_Cycle & "(Test_Cycle,Sno,Group_Name,Test_Case,Tester) values ('" & New_Cycle_Name & "'," & no & ", '" & Group_Name & '", '" & Test_Case & "','" & Tester & "')")
-
Regards
Veena
Sign in to post your reply or Sign up for a free account.
Similar topics
by: James Hong |
last post by:
Help please, I try to sending an email from my html page using the java
applet.
but it give error on most of the PC only very few work, what is the error i
make
the java applet show as below
...
|
by: MuZZy |
last post by:
Hi,
I just wonder if someone can help me with this:
I need to create a sql script which will run when user installs/upgrades my app.
User may already have the database and tables tructure setup...
|
by: Bernd Koehler |
last post by:
Hi:
I am a EE prof currently teaching an IT course.
One the assignments students recently completed was designing a small
MS Access Database.
I have two submissions that are remarkably...
|
by: James Radke |
last post by:
Hello,
I have a multithreaded windows NT service application (vb.net 2003) that I
am working on (my first one), which reads a message queue and creates
multiple threads to perform the processing...
|
by: JonathanParker |
last post by:
Looking for some help urgently with some VB SQL Access stuff. You'll have to excuse the messiness of the code, I'm a newbie at all this. I'm running this code with a selection of check boxes to...
|
by: shsandeep |
last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development
database while it took 2 hours to load in a UAT database.
UAT db is partitioned.
Dev db is not partitioned.
the...
|
by: André |
last post by:
Hi,
I made a webform for a survey, with multiple-choice questions. The results
of each question is put into a table e.g.:
values frequency
1 6
2 3
3 32
4 ...
|
by: Brad Isaacs |
last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database.
I am using Visual Studio 2005 and developing on my Local machine. I am
working with Login controls ASP.Configuration, I...
|
by: SOI_0152 |
last post by:
Hi all!
Happy New Year 2008. Il hope it will bring you love and happyness
I'm new on this forum.
I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c.
Everything works...
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |