473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Dynamic SQL generation is not supported against a SelectCommand ...

hi,
I am getting the following error.
Dynamic SQL generation is not supported against a SelectCommand that does
not return any base table information

when i try to use da.update

I squeezed my program to just few lines to know the reason for this error.
Atlast,
i found that if i am using the stored procedures to get the data, then this
error is caused, If i simply use

Dim cmd As New OleDbCommand("select * from table1", con)
it does not give any error.

But i need to use stored procedures in my program , could someone please
tell if their is any work around

Here is the few lines of code

Dim con As New OleDbConnection(ConnString)
da = New OleDbDataAdapter

ds = New DataSet()

Dim cmd As New OleDbCommand("select * from table1", con)

' Dim cmd As New OleDbCommand("q1", con)

' cmd.CommandType = CommandType.StoredProcedure

da.SelectCommand = cmd

da.FillSchema(ds, SchemaType.Source, "myTable")

da.Fill(ds, "mytable")

Dim cmdbuider As New OleDbCommandBuilder(da)

DataGridView1.DataSource = ds

DataGridView1.DataMember = "mytable"


Nov 21 '05 #1
2 3270
Irfan,

In my opinion does this not need a workaround, this sounds if your stored
procedure is wrong.

Is that as simple as you show now.
Otherwise try it first in the way you did now, however not as stored
procedure but as now with commandtext.

I hope this helps,

Cor
Nov 21 '05 #2
>
Is that as simple as you show now.


Is that stored procedure as simple............

Cor
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: JDPope | last post by:
I have a situation which I cannot get a good lead on how to resolve. One of the applications I support uses the Hibernate software to generate SQL. The app is JAVA with JDBC. In testing the users...
1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
4
by: DraguVaso | last post by:
Hi, For my VB.NET application I have the following situation: 2 tables on my SQL Server: tblAccounts and tblRules. For each Account there are many Rules (so tblRules is linked to my tblAccounts...
0
by: Gancy | last post by:
Hi, I have data access tier designed in such a way, just by changnging application settings, same lines of code is made to work with both MS SQL Server or MS Access. Code works fine with MS SQL...
2
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...
5
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...
5
by: =?Utf-8?B?QUEyZTcyRQ==?= | last post by:
The full error message is "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information." I am getting this error when...
0
by: pieandpeas | last post by:
Hi, I'm having a problem with my code, I am doing the following - retrieving a field from a table, which is linked to another table, i'm only updating one of the fields in one of the two tables......
16
OuTCasT
by: OuTCasT | last post by:
Anyone know how to get passed this prblem Dynamic SQL generation is not supported against multiple base tables
0
BarryA
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...
1
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...
0
marktang
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,...
0
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...
0
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,...
0
jinu1996
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...
0
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...
0
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...
0
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...

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.