|
Use a command object, or wite the SQL yourself e.g.
strSQL = { CALL myStoredProcedure ('txtParam', 'numParam', #01-Jan-2002#) }
If the SP returns a recordset then
dim rs as new adodb.recordset
rs.open strsql, cnn, ...., ....
|
|
|
|
|
I have connected to Sybase from VB using DTS on MS SQL Server; the only problems i really had was datatypes. Money doesn't equal money, etc.
Here is a bit of my code. It's much like connecting to any other ADO or ODBC device.
<br />
Set oConn = CreateObject("ADODB.Connection")<br />
oConn.Open "Srvr=[servername];Driver={SYBASE SYSTEM 11};uid=[username];pwd=[password];"<br />
And yes you have to have the proper drivers installed on your machine to connect to sybase.
Real programmers don't document. If it was hard to write, it should be hard to understand.
|
|
|
|
|
Does anyone know how I can turn off the auto-compile feature in VB.NET?
Thanks
|
|
|
|
|
How can I programmatically check if a certain Windows component (e.g., Dial-Up Networking) is installed?
Is there a way for a VB program to launch the installation process for a missing component?
Platform differences?
Anyone?
A reasonable man adapts himself to the world. An unreasonable one persists, trying to adapt the world to himself. That is why all the progress in the world depends on the unreasonable men.
|
|
|
|
|
I'm not an expert but wouldn't you just create a component via its ProgId which you can lookup with the OLE/COM viewer in VC++? It's also known as the OleView tool on Start Menu | Programs | Microsoft Visual Studio 6.0 Program | Microsoft Visual Studio 6.0 Tools submenu.
e.g. Set objScripObj = CreateObject("MSScriptControl.ScriptControl.1")
Just trap the error (On Error....) if the Set statement fails, then it is not installed on the system or in the registry. As far as installing a missing component, you would have to provide it since it isn't already installed and if its the DUN object, I don't know about the compatability between different Windows OS.
|
|
|
|
|
Helo
I want my VB.NET app to have the same good looking MainMenu as in Visual Studio.Net.
Is it a add-in component or avilable as default?
/Knappen
|
|
|
|
|
|
I have no idea what to do. i would like to add a form to an existing form by way of button.(i push a button, it should load form2 with my controls on it.) i tried the
application.run(windowsapplication1.form2) under Button1_click sub, and it doesn't work. (it says something about threading error.)
<marquee>
Help me!!
|
|
|
|
|
try this:
Dim F2 as new form2
F2.Show()
-or-
Dim F2 as new form2
F2.ShowDialog()
Hope this helps.
|
|
|
|
|
theres a much simpler way...... just code this in the button so the sub routeen will look something like this:
sub button1_click()
form2.show
end sub
|
|
|
|
|
I've created a my own node class that inherits from treenode and included some extra properties. When I try and add one to a normal treeview, my custom properties are gone. Here is what I do:
Dim temp as new myNode()
with temp
'set some properties
End with
treeview1.nodes.add(temp) 'I'm assuming that here it gets converted to a normal node.
To get around this, I tried to make a custom TreeNodeCollection, but the IDE gives me problems with sub new. To see the errors, copy this:
Public Class myCol
Inherits TreeNodeCollection
'...
End Class
I would greatly appriciate any help.
-Steve
|
|
|
|
|
Hi,
When your going to retrieve the TreeNode you'll have to cast it to the right object-type like
- Custom node-class = TreeNodeEx
Private Sub TreeNode1_Click(sender as object, e as TreenodeEventArgs) ...<br />
Dim MyTreeNodeEx As TreeNodeEx<br />
<br />
MyTreeNodeEx = CType(e.Nodes.SelectedNode, TreeNodeX)<br />
...<br />
End Sub
This is what I'm doing when using the treeview with custom nodes.
I hope this answers your question.
Greets,
Poolbeer
Sorry no sigh yet
|
|
|
|
|
hi
i want to draw a graph with respect to date.. soif there is a control for this please let me kno and also tell me some way that i can draw this without the control
regards
|
|
|
|
|
there is a control...... MSCHART.OCX if i remember correctly.... have fun
|
|
|
|
|
HI Folks
i use a text box for my applicationa nd am right nowhaving 2 problems that i need to address.
1). Whenever that text box gains focus for user to input data the cursor goes and stands right in the middle of the first line,While i want it to stand at the extreme left ahnd top corner.Now what property of the textbox do i need to meddle with to get what i want.i tried so many things but nothing seems to work.
2). when i use the ' symbol in my data input inside the text box like say "I've a good car" im not able to input data inside the databse becos of the "'" symbols importance in a database.now how do i overcome it.do i ahve to search for every text in my text box for that occurence and change it to something else??
Regards
Pradhip Swaminathan
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
- Try this in the
Focus event: TextBox1.SelectionStart = 0 and TextBox1.SelectionLength = 0 (In VB6, these are called SelStart and SelLength ) sValue = TextBox1.Text.Replace("'","''") , or in VB6, sValue = Replace(TextBox1.Text, "'", "''")
|
|
|
|
|
Hello!
I want to programm a ComboBox in Excel. My problem:
How can I get a text in the dropdown-list from the ComboBox ?????
MFC is the Best
|
|
|
|
|
try this:
Dim myCB As CommandBarComboBox
Set myCB = EXLapp.CommandBars(myComBarIndex).Controls.Add(msoControlComboBox)
myCB.AddItem ("Item1")
myCB.Text = "select an item"
Set myCB = Nothing
reply if you have any questions
|
|
|
|
|
Thank you very much!
MFC is the Best
|
|
|
|
|
Is there anyway that I can pass a variable into a vb program when I call it. I want to do something like
vbprogram.exe textfile.txt
but I don't know how to receive the variable and stuff in the vb program.
I know in C it's argsv. any help would be great.
ICXC
NIKA
|
|
|
|
|
The default VB projects normally create Sub Main(), kinda like void main() in C++. Well, just like in C++, there are other "versions" of the main function:
Sub Main(ByVal CmdArgs() As String)
Function Main() As Integer
Function Main(ByVal CmdArgs() As String) As Integer
Just replace the default with the one you need.
|
|
|
|
|
There's also the Command object. And, you can access it from anywhere in the program. It's a string containing what was passed on the command line after the executable's filename. It's up to you to parse it.
Try this...
MsgBox """" & Command & """" Then, compile it into an exe and run it from the command line passing whatever you want.
Jeremy Falcon
Imputek
<nobr>"The happy people are those who are producing something; the bored people are
those who are consuming much and producing nothing." - William Ralph Inge
|
|
|
|
|
hi
any1 have idea how too create Timeline
on the basisc of date
using VB.Net...or creating Graphs in Vb.net
|
|
|
|
|
i am having prb in Transfering Files/Folder over a network (LAN). i have to transfer my files from my server on the workstations of the lan .
FTP should be the choice / Winsock.
pls tell me abt it
Work Hard and Test your Luck
|
|
|
|
|
check out these three links .. i hope ya get wat ya want..
http://www.15seconds.com/issue/981203.htm
http://www.acky.net/vb/vbtcp/index2.sht
http://www.vb2themax.com/HtmlDoc.asp?Table=Articles&ID=520
|
|
|
|