|
I'm not sure why you want to pull the entire months of tables data. I suspect that the data set will take some time to fill. You could try a paramtized query. Only fill the dataset withthe requested row. The difference is you would add "Where RecID = ? ".
Your form would then have a text box for the user to enter an ID and a button to retrieve the data. Is this something that you could use?
|
|
|
|
|
hiii to alll
i want to know how can i replace color of an image pixel by pixel. means i have an image having differnt colors e.g a carpet design , now wht should be hapened that if i want to replace red color whereever it is the red color on the image, it is then replaced with (say) green color, wht should i do?
can any body give me code in VB 6.0 coz i m new to VB.
plz its a bit urgent
thanx
regards
Tahir
|
|
|
|
|
THe PSet method will change a specific pixel of an image loaded by a picture box control.
Glano perictu com sahni delorin!
|
|
|
|
|
I have a program that loads a excel spreadsheet into a datagrid on my form. I now want to take that same information and load it to a SQL Server table from the datgrid. Is this possible?
here is what i am doing so far:
Dim a As String = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=c:\supplier requirements.xls;" _
& "Extended Properties=Excel 8.0;"
' Create the connection object by using the preceding connection string.
Dim objConn As New OleDbConnection(a)
' Open connection with the database.
objConn.Open()
' The code to follow uses a SQL SELECT command to display the data from the worksheet.
' Create new OleDbCommand to return data from worksheet.
Dim objCmdSelect As New OleDbCommand("Select * from [supplier requirements$]", objConn)
' Create new OleDbDataAdapter that is used to build a DataSet
' based on the preceding SQL SELECT statement.
Dim objAdapter As New OleDbDataAdapter()
' Pass the Select command to the adapter.
objAdapter.SelectCommand = objCmdSelect
' Create new DataSet to hold information from the worksheet.
Dim objDataset As New DataSet()
' Fill the DataSet with the information from the worksheet.
objAdapter.Fill(objDataset, "XLData")
' Build a table from the original data.
DataGrid1.DataSource = objDataset.Tables(0).DefaultView
|
|
|
|
|
Greetings
I am using VB.Net (Visual Studio 2003) & i would really like to know how the MS Access's "autonumber" should be handled in a disconnected programming environment under ADO.NET.
Your response is greatly anticipated.
Many Thanks
Gizmo
|
|
|
|
|
You wouldn't do anything with it. The autonumber field will get filled in when the recordset is finally added to the table.
RageInTheMachine9532
|
|
|
|
|
Thanks alot.
I appreciate your help.
Gizmo
|
|
|
|
|
Hi,
I have a dll writen in C++ which contains a fn that takes a char** parameter. Now, if I call this fn from a VB application, how can I specify aargument-value to the fn.
it shows a 'long' in my VB method call.
Shenthil
|
|
|
|
|
char** means : pointer to pointer of type char
pointers are 4 byte integers in Win32
so long is the VB6 type that can represent it..
If you use COM pass BSTRs not chars
|
|
|
|
|
|
|
see, I am using the foll. Win32 API. here I want to pass the argument for the third parameter- lpServiceArgVectors . If I call the same api from my .cpp program I will pass the arg.vectors or arg.array. But, in VB how can I pass the vector/array. can u help me?
Public Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" (ByVal hService As Long, ByVal dwNumServiceArgs As Long, ByVal lpServiceArgVectors As Long) As Long
Shenthil
|
|
|
|
|
|
I am trying to print the content of a textbox to a printer using visual basic 6. What is the easiest way of doing this?
SDE
|
|
|
|
|
Use the Printer object and it's Print method. See this MSDN section[^] for the docs on printing in VB6.
RageInTheMachine9532
|
|
|
|
|
|
I am using the classes and methods from the Msxml2.DOMDocument.4.0 namespace to dynamically create an XML file using VBScript. (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xml_mth_sz_3jol.asp). I was able to successfully create the XML and load it into memory for parsing. However, for some reason, I am not able to use the SelectSingleNode() method of the IXMLDOMNode object. The error I get is: "Object doesnt support this property or method. Error code: 800A01B6".
Any ideas?
|
|
|
|
|
Does anyone know if you can interact with an embedded OLE object in PowerPoint slideshow mode? I have an OLE object which draws a 3D representation of a plane and would like to manipulate it using mouse events. I can get to the COM interface of my object, but it seems impossible to refresh the content of the slide with the new picture.
Thanks to all,
pnyr
|
|
|
|
|
Ok, first and formost, thanks everybody that helped me with my last 2 questions. I THINK I have that problem all worked out. With less than 2 weeks until my semester project gets done, I'm starting to feel the heat and I'm forgetting some of the very basic of basics. I have a label that I want to change the value of from what I made it at design time to something else during run time. So obviously I need a
label.caption = literal string
statement. My question is... HOW IN GOD'S NAME do you put quotations around a word inside your literal string? I thought there was a way to trap out a character by putting something in front of it, but I can't remember to save my soul...I've tried square brackets, dollar sign, single quote, back quote...everything. Little help?
--------------------
Tim Perry
"Remember, comments are there to make people laugh, not to help them fix your code later...because you're code is always perfect"
|
|
|
|
|
Hi Tim. In C# you would escape the double quote with a backslash in front of it. In VB.NET you can always use Chr(34) :
dim kQUOTE = Chr(34)
label.caption = "My string with a " & kQUOTE & "quoted" & kQUOTE & " word" I think the Microsoft.VisualBasic namespace has a Quote constant you can use too.
|
|
|
|
|
The chr function idea worked, thanks tons!!! I honestly never would have thought of that one
--------------------
Tim Perry
"Remember, comments are there to make people laugh, not to help them fix your code later...because you're code is always perfect"
|
|
|
|
|
You could also just use double-quotes. Where there are two quotes in a row, a single quote marks becomes part of your litereal string:
Dim strLiteral As String = "This is a ""quoted"" string."
lblSomeLabel.Text = strLiteral
will output a label that looks like this:
This is a "quoted" string.
RageInTheMachine9532
|
|
|
|
|
You know, Dave, it's amazing to me the things I have forgotten...
Now I remember two-quotes-in-a-row! (no really, I used to code in vb a lot... honest!)
|
|
|
|
|
I know the feeling! There's so much I've forgotten about Intel X86 Assembler... like everything...
RageInTheMachine9532
|
|
|
|
|
I tried to implement the code in the article: http://www.codeproject.com/vb/net/data_accessor_class.asp and get the following errors when trying to compile using command line. Although the article imports sqlClient, I am using OleDb because of Access database. But the problem occurs even for System.Data.
I have installed .net framework and .net SDK. I do not have Visual Studio .net installed. Am I missing to install something else?
Error
C:\test.vb(1) : error BC30466: Namespace or type 'Data' for the Imports 'System.Data' cannot be found.
Code snippet looks something line this -
Imports System
Imports System.Data
Imports System.Data.OleDb
Public class clsTest
Public Sub New()
End Sub
Public Sub GetSomeData(ByVal sender As System.Object, ByVal e As System.EventArgs)
..............
...............
|
|
|
|