473,387 Members | 1,517 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,387 software developers and data experts.

Save a virtual table to a SQL Table

Hello

i need to save a virtual table (dataset table) into a SQL table
somo one know how to do it ??

(this is part of my code)

Dim sqladapt As SqlDataAdapter
Dim dsOC As New DataSet
Dim dt As New DataTable
Dim sqlcon As New SqlConnection(General.ConnectionString)

Dim sqlcom As New SqlCommand("select a.wring, a.ClaveWring, a.descripcion,
a.pedido, b.UnidadMedida1, b.unidadEmpaque1, b.PrecioPorEmpaque3 from
OrdenCompra_detail a join CatalogoWrings b on b.id_wring = a.clavewring where
ID_ordencompra = @oc", sqlcon)

Dim dgTabStyle As New DataGridTableStyle
Dim dcpaquete As New System.Data.DataColumn("Paquetes")
dcpaquete.DataType = System.Type.GetType("System.Int32")
Dim dcunidad As New System.Data.DataColumn("Unidades")
dcunidad.DataType = System.Type.GetType("System.Int32")
sqlcon.Open()

sqlcom.Parameters.Add("@oc", SqlDbType.Int).Value = 5
sqladapt = New SqlDataAdapter("", sqlcon)
sqladapt.SelectCommand = sqlcom
dsOC.Clear()
sqladapt.Fill(dsOC, "Compras")
dsOC.Tables("Compras").Columns.Add(dcpaquete)
dsOC.Tables("Compras").Columns.Add(dcunidad)
dt = dsOC.Tables("Compras")
DgResumen.DataSource = dsOC.Tables("Compras")

===========================
i need to save the "compras" table to "Order_Detail" (an sql table in my
database)
Nov 21 '05 #1
0 1007

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

Similar topics

15
by: Prabu | last post by:
Hi, I'm new to python, so excuse me if i'm asking something dumb. Does python provide a mechanism to implement virtual functions? Can you please give a code snippet also...:) Thanx in advance...
4
by: vijay | last post by:
I have a doubt with size of classed with virtual functions I have declared A,A1,A2 ,B , C, D some classes with no varaibles but a vitual function each, The size of A is as expected 4 bytes with...
1
by: Venkat | last post by:
Hi, I have an file1.exe file stored at some physical location say C:\Test\file1.exe. I created a virtual folder say MyFolder pointing to my physical folder(C:\Test\). I wrote this piece of...
32
by: Adrian Herscu | last post by:
Hi all, In which circumstances it is appropriate to declare methods as non-virtual? Thanx, Adrian.
0
by: tnks | last post by:
Hello i need to save a virtual table (dataset table) into a SQL table somo one know how to do it ?? (this is part of my code) Dim sqladapt As SqlDataAdapter Dim dsOC As New DataSet Dim...
12
by: sojin | last post by:
Hi all, I'm a new to c++... and I've some doubts on "virtual" topics. 1) Can abstract base class have V-table? Here's the way,, Class CTemp{
14
by: fdu.xiaojf | last post by:
Hi, I have a program which will continue to run for several days. When it is running, I can't do anything except waiting because it takes over most of the CUP time. Is it possible that the...
1
by: rn5a | last post by:
When users submit a Form with a SQL query, the resultset is retrieved from a MS-Access database table which is then exported to an MS-Excel worksheet. After the records get exported to MS-Excel, I...
17
by: Jess | last post by:
Hello, If I have a class that has virtual but non-pure declarations, like class A{ virtual void f(); }; Then is A still an abstract class? Do I have to have "virtual void f() = 0;"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.