-
Jul 10th, 2018, 08:36 PM
#1
Thread Starter
New Member
-
Jul 11th, 2018, 10:16 PM
#2
Re: Adodc Recordsource (HELP)
You show two different sql statements the one in the window is not valid then one in code looks to be ok assuming that display is a string variable that holds the name of a table. If it is an empty var then that too would be invalid
-
Jul 12th, 2018, 12:04 AM
#3
Thread Starter
New Member
Re: Adodc Recordsource (HELP)
@DataMiser
so what should i do?
-
Jul 12th, 2018, 05:52 AM
#4
Re: Adodc Recordsource (HELP)
> "So i made a program that creates a table using a name from textbox ..."
Bad Idea.
Database != WorkBook.
Table != Spreadsheet.
- If the user enters a name that isn't a valid table name for your database, your application dies.
- If the user enters something "nasty", your application dies.
Obligatory XKCD Reference: Little Bobby Tables - Having created a table, you then need some way of knowing what that table was called. That's generally done by having another table that holds all the table names! It rapidly gets very complicated, making more work for you.
Unless you have a very, very good reason to do so, you should be using a single table for this and the values entered are just fields within that table, for example:
Code:
select * from users ;
+----+------------+------------+-------------+
| id | Last_Name | First_Name | Middle_Name |
+----+------------+------------+-------------+
| 1 | Flintstone | Frederick | Joseph |
| 2 | Flintstone | Wilma | |
+----+------------+------------+-------------+
Regards, Phill W.
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
|