|
You need to do OdbcDataAdapter.Fill(dataset)
This will use the select command to fill the dataset
Thanks,
-Len Miller
"If I had eight hours to chop down a tree, I'd spend six sharpening my axe."
-Abraham Lincoln
|
|
|
|
|
Ok, thats clar, but... I have one DataGrid, 5 Tables and relations between Tables. When am I in 3 table, I do som changes. I 2 Table (2.Table is Parent of 3Table) I have one field, which is SUm of fileds in 3 Table. When I come to 2 Table, I need make "Refresh", t.m. SELECT. But when I use FILL, In DataGrid is 1 Table.
Calculated field I cann not use, there is som problem with "Cannot change read only property for calculated field" )
When you know something about my problem, pease help me.
Thanks, Julo
|
|
|
|
|
Hi Folks,
I am looking for a free CTL or COM Control for XML Editing to use from VB6. Binary is okay - source might be nice.
Thanks
Davy
My Personal Blog - Homepage
|
|
|
|
|
Hello,
this is Manoj,doing a project in a company. In my project, I want to send mail (automatically, without click on send & even not displaying the composer window)through vb.net using my microsoft outlook (or anything else if can be used) which is configured to Microsoft Exchange server named bgeexc05. I am generating password automatically for an employee once he enters his empid,that password need to be sent to his emailid (by accessing emailid from database). Below are the error message which i get by using the respective code:
I have put, "Imports System" & "Imports System.Web.Mail" & below codes Written for Click Button
I have also tried for localhost.
Code1:
Dim from As String = "manoj.jahagirdhar@abc.com"
Dim mailto As String = "manoj.jahagirdhar@abc.com"
Dim subject As String = "PWD"
Dim body As String = "UtilMailMessage001 - success"
SmtpMail.SmtpServer = "bgeexc05"
SmtpMail.Send(from, mailto, subject, body)
Error Message1:
"The transport failed to connect to the server"
Code2:
Dim email As New System.Web.Mail.MailMessage
email.To = "manoj.jahagirdar@abc.com"
email.From = "manoj.jahagirdar@abc.com"
email.Body = "MessageText"
email.Subject = "SubjectText"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "bgeexc05"
System.Web.Mail.SmtpMail.Send(email)
Error Message2:
The server rejected the sender address. The server response was: 454 5.7.3 Client does not have permission to submit mail to this server
Also i get get message saying, "Cannot relay on manoj.jahagirdhar@abc.com" ..........
Kindly Help
|
|
|
|
|
Download 101 VB.NET examples from msdn.microsoft.com. There is an example for sending email. You can see what to do from there.
Sounds like either your code is way off track or there is something wrong with the settings on the machine your code is running on.
|
|
|
|
|
As far as i know the smtp server needs to be the server of your service provider that you are connected with not your exchange server. For example if your internet access was with BT your smpt server would be something like smtp.btinternet.com otherwise you could easily spam from anyones email servers.
JJ
|
|
|
|
|
Can you create a VB6 program that does multi-tasking? I have to create a Printed Circuit Board test program that concurrently tests 2 boards.
Thank you for your help in advance.
|
|
|
|
|
VB6 doesn't support multi-threading. It is possible to do, but you can't debug the code using the VB6 IDE. It'll crash the IDE when the code hits a breakpoint. Last time I searched for articles on VB6 multi-threading, I came up empty.
If you really want to do this, I suggest saving yourself the time and aggrevation and do in VB.NET or C#. At least in the .NET Framework, multi-threading is MUCH eaasier to code, debug, and support.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi ppl,
i have a database with only one table named project_name. what i want is that on the page load event the last record of this database should be displayed in a textbox on my web form. how doi do this. i'm using access as my database. please help me.
thanks and regards
manik
|
|
|
|
|
This can easily be done using an SQL statement, something like:
SELECT LAST(fieldname) AS LastProjectName FROM project_name;
This will return a single table, with one row under the column name "LastProjectName".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanx dave,
it works.
regards
manik nath
|
|
|
|
|
sorry to bother you again dave. but the code works fine and gets me the data on to a datagrid. only one single LastProjectName data is returned. but when i try to get the data to a dropdownlist it does not work. how do i do this. also if there is a way by which i can get the data on a datagrid to a textbox.
i mean that the datagrid displays the LastProjectName but can i get this value into a textbox.
thanx and regards
manik
|
|
|
|
|
i find active window(FindWindow) using API. but i don't know how pass string (search word) to FindWindow's textbox? when it active. i am using sendmessagebystring API but it changes caption of active windos.
Any help appreciated
Thanks in advance
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Static lHwnd As Long
Dim lCurHwnd As Long
Dim sText As String * 255
Dim caption
lCurHwnd = GetForegroundWindow
If lCurHwnd = lHwnd Then Exit Sub
lHwnd = lCurHwnd
If lHwnd <> hwnd Then
caption = Left$(sText, GetWindowText(lHwnd, ByVal sText, 255))
Call SendMessageByString(lHwnd, WM_SETTEXT, 0&, ByVal "sample")
End If
|
|
|
|
|
You sent the SETTEXT message to the window, thereby changing the window title. You need to find the window that represents the textbox in that window, then send the message to that.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Please explain how to do that?
|
|
|
|
|
Hi all,
In VB6, how can I cast an object?
thx
|
|
|
|
|
i don't know VB6, but isn't there any CType() function ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thx for your reply, but it seems CType is a VB.Net function
I need a function that can be run in Outlook Marco
|
|
|
|
|
From memory (its been a while): CInt, CStr, CLong, CDbl, CDate
|
|
|
|
|
I have two date columns...StartDate & EndDate in my datagrid.
In my third column I need to display result of 'Start Date- End Date' in number of days
i.e. column3(no of days)=column2(enddate)-column1(startdate)
Using item template is one option but I cannot figure out how to subtract dates, calculate date and display in the subsequent item sell.
Any help anyone?got a deadline to meet
(Language = Vb.net)
Many Thanks in advance.
arty=me
|
|
|
|
|
When you subtract one datetime from another, the object that is returned is called a TimeSpan, as in
TimeSpan ts = endDate - startDate;
TimeSpan has a Days property.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
you can use
NoOfDays=DateDiff(Dateinterval.day,FirstDay,SecondDate)
where NoOfDays is of type long
Lata Agrawal
|
|
|
|
|
Introduction: I am working on a desktop application (Windows based). It is a Wizard kind of application where there are steps. You need to click on Next to go ahead and Previous to go back. On screen two I have a Data Grid which is set as read-only.
Problem: Some of the times the horizontal scrollbar of Data Grid disappears. If you double-click on Data Grid header or resize header, scrollbar appears.
What could be the cause of this, and how can we get rid of this?
- ashish
|
|
|
|
|
I am using Visual Studio Dot net 2005 for writing a program.i have to plot a graph in it from data given.i am using visual basic for this code.please help me and let me know how to plot the graph.how to make grid and all and plot graph.is there some application available tht will plot the graph automatically.
Thanks in advance.
|
|
|
|
|