472,362 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,362 software developers and data experts.

Retriving Table table name and field names

hi frnz,

In my coding i take the tablename and columns from the system and i execute the new query with that values.

if i give the table name directly it is working.but if i give the table in runtime it is not working.

here i send the the coding.help me to correct this prob.thanks advance for ur help

strqry="SELECT column_name FROM information_schema.`COLUMNS` C where table_name = '"&query1&"'"

RsSearch1.Open strqry,ObjConn, 2, 3
Do Until RsSearch1.EOF

Set RsSearch2 = Server.CreateObject("adodb.recordset")

str2="select "&cm_id(1)&" from "& trim(query1) &" where " & cm_id(2) & " like '%" & str & "%' or " & cm_id(3) & " like '%" & str & "%' or "& cm_id(4) & " like '%" & str & "%'"

RsSearch2.Open str2,ObjConn, 2, 3

Error is on query1.it is table name.if i give it directly means it is working.but this coding not working.
Jul 4 '06 #1
0 1589

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Pato Secruza | last post by:
Hi everyone! I have a really frustrating error and need help. I’m trying to do a function that gets the properties and names of the fields in a MS Access database using ASP. I haven’t...
by: Randy | last post by:
Access= 2002 I'm NOT a Programmer, but I have used VB in the past to do some things ( Spaghetti Code King) so I have some understanding of Coding I need to replace a text field (teacher) in...
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg...
by: pchaitanya | last post by:
hi all, suppose in a table if i have columns namely name,entrydate now on retriving and binding to a gridview how can I get names rowwise and entrydate columnwise on a gridview on...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.