|
I was working with a datagrid control connecting to a small 3 column access database. I have everything working but i have a save button and i want the save button to become active right when you edit something in on of the fields. I have accomplished this by using a timer and saying
if dataset.haschanges then<br />
btnsave.enable = true<br />
end if
But this only enables the button when you stop editing that cell i want the button to become active right when the editing begins. Thank you
|
|
|
|
|
Try this event!
dragrid1_edit
I don't remember exactly!
Do you want a loans with good services? Do you want to improve your finance?
This web site will be helpful
www.c-loans.com
You will love our services!
|
|
|
|
|
Am inserting a calender control programmatically into a web form but when I browse/ preview it & try to select, a date, the form gets 'reset' All controls apart from the buttons disappear It seems their is some hidden javascript that I can only see in the html, when browsing & not when developing.
What should I do to be able to submit selected dates to a database? (And not 'reset' the form)
|
|
|
|
|
This question belongs in the ASP.NET forum...
This sounds like a standard form that is never going to change. Why the need to insert a DateTime picker programatically? If the user is not supposed to see the control (or a group of controls), why not put it in a DIV or SPAN section, or a .NET Panel control, and keep it hidden until the user needs to see it?
RageInTheMachine9532
|
|
|
|
|
The entire form is being asembled programatically... client's wishes... The only controls that are 'declared' in asp.net are the containing asp panel and a hidden textbox. How do I insert a datetime picker programatically?
|
|
|
|
|
That's insane! Oh well, it's their money...
The way I've done it in the past is to put a PlaceHolder control on the page where you want the new controls to show up. This make it much easier to control the placement of generated controls. Next, when you put the new control in the PlaceHolder's Controls collection, you'll have to wire up the event handlers yourself. The basic code is something like this:
Dim myCalendar As New Calendar
myCalendar.ID = "myCalendar"
AddHandler [add any event handlers and function delegates here]
RageInTheMachine9532
|
|
|
|
|
Hi, I'm creating a COM Dll using VB6, I created simple functions to make an update on a database, but it doesn't work, I'm using an ASP Page that succesfully create the object but gives me errors when I try to insert or update data (Also I tried creating the object from other VB Application but didn't work either, 'weird' but when I use this code on a EXE it works, but I need this in a COM Dll).
VB Dll Code
Public Function Save()<br />
Dim Cn As New ADODB.Connection<br />
<br />
Cn.ConnectionTimeout = 100<br />
Cn.ConnectionString = "DBQ=test.mdb;" & _<br />
"DRIVER={Microsoft Access Driver (*.mdb)};" & _<br />
"DefaultDir=C:\My Docs\My Source Code\VB\ASP-COM Test;" & _<br />
"UID=admin; PWD=;"<br />
Cn.Mode = adModeReadWrite<br />
Cn.Open<br />
<br />
Cn.Execute "INSERT INTO tests (test_value) VALUES ('test3')"<br />
<br />
Cn.Close<br />
<br />
Save = True<br />
End Function
ASP page code
<%<br />
Dim iTest<br />
Set iTest = Server.CreateObject("TestProject.Test")<br />
<br />
Response.Write iTest.Save<br />
%>
Like this it returns this error
Error Type:<br />
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<br />
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.<br />
/xue2/index.asp, line 6
I also tried using a RecordSet Object but gives this error:
Error Type:<br />
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<br />
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.<br />
/xue2/index.asp, line 6
Thanks if anyone can help!
Vertigo
|
|
|
|
|
Hi
I faced similar problems with {Microsoft Access Driver (*.mdb)}; provider
try : OLEDB jet provider :
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin; Password=;"
and check http://www.connectionstrings.com [^]for more
|
|
|
|
|
Oh!, thank you for your answer, I tried before the same connection string with no positive results , but I found the solution , it was not big deal, it was nothing in the code, it was a problem with permissions in the IIS Configuration (Not using Anonymous Access [chosen by default when you create a virtual directory], the correct one was using the Integrated Windows Authentication.). I lost a complete day in a such thing but it happens .
Anyway, Thx for your help,
Vertigo
|
|
|
|
|
i have a string and i was wondering how i could grab each character of that string for example in c++ if
string="Hello World"
then
string[3]
would return a "l"
thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
mid("Hello World",4,1)
returns "l"
note that in VB6 the first character index is 1 not 0 like C.
|
|
|
|
|
awsoem thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
You can also get them easily using the Chars property:
<br />
Dim s As String<br />
Dim i As Integer<br />
<br />
s = "one for the toad"<br />
For i = 0 To (s.Length - 1)<br />
Console.WriteLine(s.Chars(i))<br />
Next<br />
Note that most of the properties, etc. dealing with arrays in the BCL use zero-based indexing. It can be confusing switching back and forth between zero- and one-based indexing.
[EDIT] I misunderstood, and assumed the question was for VB .NET . I apologize. Back to the C# forums for this geek. [/EDIT]
Regards,
Jeff Varszegi
EEEP! An Extensible Expression Evaluation Package
|
|
|
|
|
could someone show me all the commands used for drawing in a picture box? (an example each would be helpful)?
is it possible to draw text in a picture box? preferabley without having to draw each pixel of each letter, u know like is there a command i could use? and could i make it centered?
thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
You didn't mention which version of VB, so I'll assume VB.NET. First, you create a Graphics object from the PictureBox's CreateGreaphics method. Then you can use the Graphics object to draw on the PictureBox. The PictureBox itself doesn't have any drawing methods. See the documentation on the Graphics class for explanations and examples. There is just way too much information to post here.
System.Drawing.Graphics class docs[^]
RageInTheMachine9532
|
|
|
|
|
actually i need it for vb 6
thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
OK. The VB6 PictureBox docs start here[^]. You can use the Print method to display text in the picturebox anywhere you want. Just remember to set the PictureBox AutoRedraw property to True first.
RageInTheMachine9532
|
|
|
|
|
how do i print a form (with all its color and everything)?
how can i pring a picture box (with all its color and everything)?
thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
in c++ dmensional arrays were defined like:
int array[][];
are dimensional arrays possible in vb and if so how do i define/use them?
thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
Dim myVar(10, 10, 10) As Long
Dim myVar(10) As Long
Dim myVar2() As Long
VB.NET only:
Dim myVar As Array = Array.CreateInstance(GetType(Integer), 10)
Dim myVar As Array = Array.CreateInstance(GetType(Integer), 10, 10)
RageInTheMachine9532
|
|
|
|
|
thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
I am developing an asp.net application using vb. I have a hyperlink control in my repeater template and I am not able to dynamically create parameters for its querystring. The parameter is the same value as the text. The reason I am using a hyperlink against a linkbutton is that I want the target window to be a popup.
<asp:HyperLink NavigateUrl="javascript:var w =window.open('Details.aspx?Name=<b>(what do I do here)</b>',null,'width=400,height=400,location=no')"
Text = <%# DataBinder.Eval(CType(Container, RepeaterItem).DataItem, "Name") %> Runat="server" ID="Hyperlink1"></asp:HyperLink>
|
|
|
|
|
hello all,
how shall i make my application, memory residant. I mean how shall i design Terminate and Stay Residant application using VisualBasic.
ComputerNewton
|
|
|
|
|
There is no such thing as a TSR in Windows. THe closet match is a Windows Service.
In VB.NET, easy, just start a Windows Service project.
RageInTheMachine9532
|
|
|
|
|
hello all,
how shall i send picture information across the network using Winsock in VisualBasic. And one more thing is that how shal i convert the BMP file to JPEG/GIF and PNG in VisualBasic.
ComputerNewton
|
|
|
|