473,804 Members | 3,675 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about CommandType TableDirect

Hi,

this code is for stored procdure:
comd = New SqlCommand()
comd.Connection = connection
comd.CommandTex t = "mysp"
comd.CommandTyp e = CommandType.Sto redProcedure

My question: i also saw when choosing the comd.CommandTyp e in VWD:
"TableDirec t". What's the purpose of this and how to use it?

thanks
Chris
Apr 11 '07 #1
1 7120
i found it:
CommandType.Tab leDirect: Should be used when you want all records from a
table returned. You would specify only the name of the table as the command.
This type can only be used with the OLEDB command object, OleDbCommand.
"Chris" <ss@ss.ssschree f in bericht
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Hi,

this code is for stored procdure:
comd = New SqlCommand()
comd.Connection = connection
comd.CommandTex t = "mysp"
comd.CommandTyp e = CommandType.Sto redProcedure

My question: i also saw when choosing the comd.CommandTyp e in VWD:
"TableDirec t". What's the purpose of this and how to use it?

thanks
Chris

Apr 11 '07 #2

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

Similar topics

2
4750
by: Rod | last post by:
Thanks in advance. I have two listboxes on a single asp page. I am trying to use sqldatareader to populate both using two seperate sql stored procs. I can populate each box seperately using two different methods but when I try to populate them both no the same page I get "InvalidOperationException: Invalid attempt to FieldCount when reader is closed" WHY???
5
1565
by: PCL | last post by:
I am trying to get the value from a simple stored procedure - the Stored Procedure returns 1 record with one field - it is basically "Select Max(po) as MaxPo from PODB" I want to store that value into a variable - in old asp i could simply say MaxPO=rs("MaxPo") and i would be done. Now i have tried using Datareaders and dataadapters w/o any success. all the examples i am finding are for datagrids and dropdown boxes. All I want to do...
3
1424
by: dot Net Pa Ji | last post by:
In VB.Net, Lines between A and B can be replaced with Lines between C and D is there something in C# like this (With... End With) ?? ---Line A------------------------------------------------------------ --vb.net code objCMD.CommandText = "select * from ..." objCMD..CommandType = CommandType.Text ...... ............... .............. ................. ................... ...... ............... .............. ....................
8
1294
by: Nick | last post by:
Hi, I'm trying to add some data on a company to an SQL server (which I can do), and want to return the FirmID (SQL identity) of the data that was just inserted so I can use it to redirect to another page based on the new data - which is the bit I can't do! Can anyone point me in the right direction? Thanks
2
6554
by: Robert Smith jr. | last post by:
Hello, Please pardon my newbie question ... I am building an ASP.NET page that displays a recordset with a Delete statement enabled (this all works fine). I want to Insert the current row *that is going to be deleted* into another table, before the original data is deleted. I am trying to use the RowDeleting method to call an Update or Insert
3
1540
by: Ken H | last post by:
Hi I have a question about architecting solutions.. I have a part of a project which requires me to track person details (name, addresses, etc... Should I be creating Person objects, Address objects etc as Business layer classes and then have an data access layer which actually save / updates / delete to and from the DB.. If so, and bearing in mind the 'easiest' way to pass data between the layers would be with a dataset - should my BL...
3
1268
by: Anthony Sox | last post by:
Anyone know the ADOX equvalent in VB.NET or ways of dynamically creating new tables using vb.net code and MSacess or SQL server. Thanks in advance
2
4018
by: Miles | last post by:
I have a VB2005 application that has the need to read FoxPro 2.5 DBF/CDX files. I have the code (below) that opens the connection, but there are never any records, nor errors, reported... Can anyone tell me what I'm doing wrong? The ConnectionString resolves to "Provider=VFPOLEDB.1;Data Source=C:\test\REVFILEF.DBF;Mode=Read|Share Deny None;Collating Sequence=MACHINE" Private Function DoDBFProcess(byVal InputFileName as String) As Long
5
2363
by: ric_deez | last post by:
Hi there, I would like to create a simple search form to allow users to search for a job number based on a number of parameters. I think I understand how to use parameteres associated with Stored Procedures with a data reader to add various parameters. However, if I have a stored procedure such as CREATE usp_SelectfromJobNumbers (@par1 datatype, @par2 datatype, @par3 datatype)
0
9707
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10586
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...
0
10338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7622
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
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.