473,946 Members | 5,941 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic SQL generation

OuTCasT
374 Contributor
Anyone know how to get passed this prblem

Dynamic SQL generation is not supported against multiple base tables
Apr 2 '08 #1
16 2208
gpl
152 New Member
Im not entirely sure what you mean - you can write dynamic sql to run against multiple tables.

Are you saying that you have a tool that generates dynamic sql for you and it wont work against multiple tables ?

Graham
Apr 2 '08 #2
debasisdas
8,127 Recognized Expert Expert
Waht exactly you are trying to do ?
Apr 2 '08 #3
OuTCasT
374 Contributor
Waht exactly you are trying to do ?
i have a win form
and 2 tables
need to get info from both tables onto the form on page load
so i used a join

created sqlDataAdapter and filled the datatable
now i want to save the data.

Expand|Select|Wrap|Line Numbers
  1. Try
  2.             sqlConnection.Open()
  3.             sqlManager.EndCurrentEdit()
  4.             Dim sqlUpdate As New SqlCommandBuilder(sqlAdapter)
  5.             sqlAdapter.Update(sqlDataTable)
  6.             sqlConnection.Close()
  7.         Catch ex As Exception
  8.             MsgBox(ex.Message, MsgBoxStyle.OkOnly, "SQL Exception Error")
  9.         End Try
that gives me the error
would it work if I wrote an update command for each table rather :??
Apr 2 '08 #4
ck9663
2,878 Recognized Expert Specialist
Where's the query?

This could be more of a VB question than a SQL question.

-- CK
Apr 2 '08 #5
OuTCasT
374 Contributor
Where's the query?

This could be more of a VB question than a SQL question.

-- CK
i was testing to get the information :

Expand|Select|Wrap|Line Numbers
  1. select s.employeeID , e.firstname , e.Lastname , s.wages from employee e, salary s where e.employeeid = s.employeeid
Apr 3 '08 #6
OuTCasT
374 Contributor
Where's the query?

This could be more of a VB question than a SQL question.

-- CK

i filled the dataTable with the sqlAdapter...an d created a currency manager to navigate through the records.

Should i create an update command for each table ?
Apr 3 '08 #7
ck9663
2,878 Recognized Expert Specialist
If you bind that query in a some sort of adapter or data object, the query is valid but it will be treated as a view. By default, you can not update a view.

-- CK
Apr 3 '08 #8
OuTCasT
374 Contributor
If you bind that query in a some sort of adapter or data object, the query is valid but it will be treated as a view. By default, you can not update a view.

-- CK
By default, a view based on one or many tables is updateable.

ive created a view now

Expand|Select|Wrap|Line Numbers
  1. Create view Employees
  2. as
  3. select s.employeeID , e.firstname , e.Lastname , s.wages from employee e, salary s where e.employeeid = s.employeeid
pretty simple now how would i use it in my code ?
Apr 3 '08 #9
ck9663
2,878 Recognized Expert Specialist
Well now that you have a view. Try updating it first in query analyzer. Once you did it, try to implement the same technique in your apps.

-- CK
Apr 3 '08 #10

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

Similar topics

1
2071
by: duncan.lovett | last post by:
I am working on a graphical heading generator for a clients website as their server does not have the GD library or similar plugins for dynamic image generation. I have achieved the result partly, from a snipet I found in the user contributions to the "str_replace" function in the manual on php.net. However there is a small problem - it only works in uppercase. Please first see my code below and then a brief description of the problem:
11
4757
by: Marco Loskamp | last post by:
Dear list, I'm trying to dynamically generate functions; it seems that what I really want is beyond C itself, but I'd like to be confirmed here. In the minimal example below, I'd like to create content to put at the address pointed to by f. In particular, I'd like to avoid/replace the memcpy line. Possible application (inspired by Paul Graham, "ANSI Common Lisp",
4
3328
by: Venus | last post by:
Hello, Thanks for your reply. I understand that a control can be created dynamically in several ways: 1) using StringBuilder 2) using Controls.Add 3) using ASP PlaceHolder But this is just for the controls and not for the form itself. What I am trying to achieve is to create an entire form (including controls)
0
1502
by: Venus | last post by:
Hello, After trying some ways to do it I wanted to use something like the code below but for some reason is not working (I have to generate the entire form dynamically (not only the controls)): Can anyone make any suggestions on how to do it ? Thanks
15
2093
by: Nospam | last post by:
Is there a tutorial on dynamic SID generation?
2
3084
by: Ghada Al-Mashaqbeh via DotNetMonster.com | last post by:
Hi all, I am facing a problem in dynamic code generation at run time, the problem occurs when the dynmaic code use global data exist within the original application. Lets say that my application is called "Dynamic Code", so the name space in my project is "Dynamic Code", I have created "Form1.cs" where my code exist. Form1 class contain a global class "xarray" with static memeber "x" which is an array, I want the added dynamic code by...
5
3189
by: pittendrigh | last post by:
There must be millions of dynamically generated html pages out there now, built by on-the-fly php code (and jsp, perl cgi, asp, etc). Programatic page generation is transparently useful. But querying a database, negotiatinig lots of if-then-else logic and echo'ing html code out on port 80 every time a page is requested has to be a huge waste of resources. Why not use that logic to print static html instead of dynamic?
3
3227
by: fedya | last post by:
I am trying to have the last 12 months to always be the option in the dropdown for a combo box. (Basically a combobox, with dynamic options) I am using Access 2000. What is the function and syntax in visual basic to edit a combobox? I can do all the dynamic month generation, but I do not know how to edit a combobox from VB. Thank you.
7
2387
by: dino d. | last post by:
Hi- I want to create a dynamic image with areas so that when the user clicks different areas, the user jumps to those pages. The problem is, I can't seem to figure out how to do this efficiently. Suppose I have a table,items in a database: itemid description count So, basically, I want to create an image that has 3 ovals, representing the top 3 occurring items (with the highest count) in
0
9981
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11558
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11334
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10686
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4939
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.