|
how to use stored procedures in acces, coding
|
|
|
|
|
Access is not a Relational Data Base.
forget the stored procedures, views, triggers and so on, they don't exist...
(and consider also your reasons of using such software instead of a real RDBMS)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Access does not have "Technically" such a thing as Stored Procedures or Views, but, it allows you to treat your Queries as "such" I am assuming that you do not want to have the SQL text in your code, and that you have created the corresponding Query in your Access DB.
To call an existing query, you can use this:
Command.commandtext = "[Query name]"
DO NOT FORGET THE []
If you are using parameters, your must create and append them to the command object before the .Execute call.
|
|
|
|
|
I have an aspx page("for generating report") in which i have 4 table tags("" for heading of report etc.) and the rows and cells to them are dynamically created based on the values retrieved from database in the form od dataset which results 4 tables. For ex:
Dim HeaderRow = New HtmlTableRow
Dim HeaderCell = New HtmlTableCell
HeaderCell.Height = "5"
HeaderCell.Attributes.Add("ALIGN", "center")
HeaderCell.Attributes.Add("CLASS", "ins-popupheader")
HeaderCell.InnerText = ds.Tables(0).Rows(0)("Title") & " - Content Report"
HeaderRow.Cells.Add(HeaderCell)
tblHeader.Rows.Add(HeaderRow)
Now the problem is.... I have an anchor tag on my report page "Export as CSV" on click of which I need to export the contents of the page to an Excel sheet.
I tried with the following code:
Response.ContentType = "application/vnd.ms-excel"
Response.AppendHeader("Content-Disposition", "attachment;filename=Ebom.xls")
Dim dsExport As DataSet = Session("Contentds")
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
Dim dgGrid As New DataGrid
Dim i As Integer = 0
For Each table As DataTable In dsExport.Tables
dgGrid.DataSource = dsExport.Tables(i)
dgGrid.DataBind()
dgGrid.RenderControl(hw)
i = i + 1
Next
' Write the HTML back to the browser.
Response.Write(tw.ToString())
' End the response.
Response.End()
It generates an Excel sheet but the format is not clear and I am missing some contents of my report page. I request if any one can help me in directly exporting the contents of my report page to Excel.
A quick response is appreciated........
Thanking in anticipation
--smitha
Smitha Bavandla
|
|
|
|
|
HOW Can i do Editable Listview?
|
|
|
|
|
I extended datagridtextboxcolumn class. When u click f5 button a special calculator form is opened as modal form. But when u close the calculator presssing OK button there is no problem; if u press cancel the focus is lost from the cell and datagrid. Why does it cause?
|
|
|
|
|
I create a datatable with 3 columns at run time and set it to a Datagrid. Datagrid has 5 extended columns. for example one is numeric column, other is a date time picker, other is button.
I aim to create as a form like EXCEL but with special columns.
I add a row to datatable after creating. I want to add others when the user fills all fields or press down key.
I couldnt achive yet, there is always problem, Could u advise another method to do that?
|
|
|
|
|
Hi Everybody!!
I am new to VB.Net and require your help on
How to Add nodes to a TreeView control from a file??
I have a file containing patterns(say Patterns.txt) and each pattern has to be a node in the TreeView
The patterns are like follows:
Pattern1 - DT;FG;HK;KH;AU;BL;JC
Pattern2 - DT;GH;AU;JH;KG;JC
So, Pattern1 will be a node in the Tree and the Tags separated by semi colons will be its children. Similarly other patterns will be populated.
Please provide me with any hint or solution.
Thank you
Bye
Enjoy!!
AyBee
|
|
|
|
|
What do you have trouble with, reading the file, or adding child nodes ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi !!
The problem has been sorted out. It was rather simple than I thought it would be as VB has already provided the necessary procedures for adding nodes and I opened the file using the File System Object.
Any further suggestions are welcome.
Thank you
Bye
ENJOY !!
AyBee
|
|
|
|
|
.... Have read about it but can't figure out the issue!
Declare WebFunction as "Save(MyNums as Array)"
Client sees MyNums as Object ... Tried a few converts.. The data in array/arraylist is just strings.
How is it done?
//Maw
|
|
|
|
|
I thought web services only spoke XML ? So then a document that contains the string list would be the thing.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Soooo .... then how is it done? I have data in an array-list that I want to pass though a WebService and I want the webservice to convert data to array-list and go through it and do some magic with its data. Data is always strings.
//Maw
|
|
|
|
|
The web service needs to expose a method that accepts this data. And the request will go as XML, the web service defines it's schema.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeah Yeah ...
Can you give me an example in code?
Regards // Maw
|
|
|
|
|
Which bit are you stuck on ? Which bit do you know how to do ? What have you done ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Welll .... have tried to pass array to webservice. Webservice is declared to take an array but wants an Object when lookin at Intellisense.
Just don't know how to do it.
Please help.... Just a simple string-array.
//Maw
|
|
|
|
|
MaWeRic wrote:
Please help.... Just a simple string-array.
What's missing in all of this is the fact that you have a *specific* web service, you're not writing one, and you've yet to post any code. What does the code in the web service proxy class look like for hte method ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
I am a newbie to VB.Net
Can anyone tell me how to disable certain tab pages from a tab control
Please help me out
Thanks in advance
|
|
|
|
|
To disable tab with index 1... myTab is my name of control
myTab.TabPages(1).Enabled = False
Good luck // Maw
|
|
|
|
|
Thanks for the reply
But the problem is
Suppose i have 3 tab pages in tab control
1 and 3 are enabled is disabled i want the tabpage button to be disabled
the button which shows the tabpage
i don't want any click event on that tab page
|
|
|
|
|
Thanks for the reply
But the problem is
Suppose i have 3 tab pages in tab control
1 and 3 are enabled 2 is disabled i want the tabpage button to be disabled
the button which shows the tabpage
i don't want any click event on that tab page
|
|
|
|
|
|
( Form 1 )
Dim frm2 As New form2
Public Sub ClearProject()
frm2.TextBox1.Visible = False
frm2.Hide()
End Sub
( Form 2 )
Dim frm1 As form1
Public Sub Button1_Click(Byval sender as System.Object,Byval e as EventArgs)Handles Button1.Click)
frm1.ClearProject()
End Sub
An unhandled exception of type 'System.NullReferenceException' has occurred
Addtional Information: Object reference not set to an instance of an object
Anyone knows why there is such an error?
|
|
|
|
|
I presume you are trying to reference frm1 (as a form1 object) from the form 2 code yet you have neither created a new instance of the form via Dim frm1 as New form1 (an explicit Set frm1 = New form1 in the frm2 Load event would be better) nor passed a reference to it to the frm2 object.
The code sample you've provided also shows that you have a circular reference between the two forms. Not a good idea.
...Steve
|
|
|
|