| Re: Realexamquestions.com study guides are best of all for IT certifcations |
|
 |
Index ‹ Visual Studio ‹ Mcse
|
- Previous
- 1
- VB Scripts >> How to email the @Identity value?I have an asp page that post values to a table and generates an email with
the information entered. I am not able to get the @Identity value assigned
by my page to be included within the email message. My code is below:
<%
Function ParseBody (strText)
strText = Replace(strText, Chr(13), ",br.")
ParseBody - strText
End Function
<%
Dim objConn
Dim mySQL
Dim objRS1
Dim objRS2
Dim strSQL
Dim strName
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
StrSQL = " SELECT TOP 1 * FROM Referrals ORDER BY RefNum DESC "
objConn.Open "Driver=SQL
Server;Server=cb-sql;Database=<database>;UID=<ID>;PWD=<pw>;"
mySQL= mySQL & "SET NOCOUNT ON INSERT INTO ReferralMaster "
mySQL= mySQL & "(Submitted,
Employee,Region,Branch,LOAlias,Customer,Street,CSZ,Phone1,Phone2,BestTime,Email,Purpose,Comments)"
mySQL= mySQL & "VALUES ('" & Request.Form("Submitted")& "','" & _
Request.Form("Employee")& "','" & _
Request.Form("combo0")& "','" & _
Request.Form("combo1") & "','" & _
Request.Form("combo2") & "','" & _
Request.Form("Customer") & "','" & _
Request.Form("Street") & "','" & _
Request.Form("CSZ") & "','" & _
Request.Form("Phone1") & "','" & _
Request.Form("Phone2") & "','" & _
Request.Form("BestTime") & "','" & _
Request.Form("Email") & "','" & _
Request.Form("Purpose") & "','" & _
Request.Form("Comments") & "')"
mySQL= mySQL & "SELECT @@IDENTITY AS RefNum SET NOCOUNT OFF"
objConn.Execute mySQL
objRS.Open strSQL, objConn
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "CB-HQ-EX02003"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
Dim strText
strText = "You have received the following referral" & vbCrLf & vbCrLf & _
Request.Form("Customer") & Chr(13) & _
Request.Form("Street") & Chr(13) & _
Request.Form("CSZ") & Chr(13) & vbCrLf & _
"Contact Information:" & Chr(13) & vbCrLf & _
"Primary Phone: " & Request.Form("Phone1") & Chr(13) & _
"Alternate Phone: " & Request.Form("Phone2") & Chr(13) & _
"Best time to call: " & Request.Form("BestTime") & Chr(13) & _
"Email: " & Request.Form("Email") & Chr(13) & _
"Loan Purpose: " & Request.Form("Purpose") & Chr(13) & vbCrLf & _
"Comments:" & Chr(13) & _
Request.Form("Comments")& Chr(13) & vbCrLf & _
"************************************************************" & Chr(13)
& _
"Submitted: " & Request.Form("Submitted") & " by " &
Request.Form("Employee")& Chr(13) & _
"Referral #: " & vbCrLf & vbCrLf & vbCrLf & _
" * * * DO NOT RESPOND TO THIS EMAIL * * * "
With cdoMessage
Set .Configuration = cdoConfig
.From = "CapitalBankMortgage@capitalbank-nc.com"
.To = Request.Form("combo2")
.Subject = "New Mortgage Referral"
.TextBody = strText
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
%>
I would appreciate any help.
Thanks
- 2
- VB Scripts >> map a network drive & create shortcut vbscriptI am very new to vbscripting. i have am attempting to map to a
network share and then create a desktop shortcut to that share. i am
having trouble placing the shortcut and hope someone can help.
What I have below will map the drive but not create a shortcut:
Set objNetwork = WScript.CreateObject("Wscript.Network")
Set oFSO = CreateObject("Scripting.FileSystemObject")
If Not oFSO.DriveExists("h:") Then
objNetwork.MapNetworkDrive "h:", "\\shervername\sharename$"
End If
set WshShell = WScript.CreateObject("Wscript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop &
"\\servername.lnk")
oShellLink.TargetPath = "\\servername\sharename$.lnk"
oShellLink.Save
- 3
- 4
- MFC >> How do I write an invisible program?I know, "invisible program" is not very useful terminology, but I
don't even know what to call what I'm trying to do. I need to write a
small program that communicates with some hardware through a serial
port, and on the other end generates keystrokes for consumption by an
application. I know how to do the serial port side, and I gather I
can use SendInput for the keystroke side. What I don't know is what
form this program should take. It doesn't need (and must not have)
any visible presence on the screen, nor does it take any user input.
So when I create the project in VS2005, what kind of project should I
create to avoid having any visible presence on the screen? I hope my
question makes sense. Thanks.
Mike
- 5
- Visual Basic >> if IsNumericI have made this simple program for counting Body Mass Index. User of the
program types in weight and length.
A function checks if weight and length are numeric Then
Calls function Count()
If Count is True Then
the resaults are shown for the user.
My problem is that when weight and lengh are typed as a char, the
application translates that as 0, so it calls the counting function though
its told not to do that if weight and length are not numerics.
Why?
Grateful for an answer
/Miss A
- 6
- Visual Basic >> opening a workbookI am attempting to learn Visual Basic using Objects for a small practical
problem in which I am converting the layout of data in one spreadsheet
into a new layout in a new spreadsheet.
My development environment is VBA in excel 2000
My current problem is in opening an existing workbook and then being
able to reference it later on in my code.
i have only been able to open the file using
workbooks.open "myfilename"
i wanted to do something like the code below (which never worked):
dim wrkbk_Name as excel.workbooks
set wrkbk_Name = application.workbooks.add
wrkbk_Name.open "myfilename"
this way i could then reference a specific workbook from among
two that I have opened (the workbook with the original spreadsheet layout
and a new one with the new spreadsheet layout)
i did notice that workbooks(2) did contain the workbook with the original
data but i could not seem to reference it with a workbook name.
- 7
- Visual Studio C++ >> IXMLDOMDocument::loadXML fails on what seems to be a perfectly fine xmlHi,
I am trying to parse an XML file using DOM in VC++.
I need an element which is inside other elements.
So I am loading the file.
Calling GetElementsByTagName to get the first level elements.
Iterating through them, get to the one I need and here I am actually in
need of another GetElementsByTagName.
Of course there is no such func in IXMLDOMNode.
Therefore I am creating another IXMLDOMDocument and trying to load into
it that inner xml part of my desired node, by using IXMLDOMNode::xml
property.
I am using loadXML, of course.
And it fails, it returns -1.
While when I substitute that pNode->xml for the same xml piece I copy
and paste from my file it works fine.
I have displayed the pNode->xml and it looks fine. Well structured and
etc.
Please help!
Any ideas ? Leads ?
Thank you!
- 8
- MFC >> how to define scroll bar's page size value?Hi all,
I have a confusion about calculating scroll bar's page size.
In my application, I am drawing an image according to scroll bar
position.
m_iGeneratedImgWidth - Width size of the image (this value is always
bigger)
rect.right - Width of the drawing area.
how to define scroll bar's page size value?
SCROLLINFO info;
info.cbSize = sizeof(SCROLLINFO);
info.fMask = SIF_RANGE|SIF_PAGE|SIF_POS;
info.nPos = 0;
info.nMin = 0;
info.nMax = m_iGeneratedImgWidth - rect.right;
info.nPage = ?
In my OnHScrollBar() function, for SB_PAGELEFT / SB_PAGERIGHT codes, I
subtract/add 10 for displaying image.
I want to set correct value, because this is the only way to change
size of the tracking thumb of scroll bar control.
:)
Purusothaman A
- 9
- MFC >> registering an add in automaticallyHi
I have created an add in & I want the add in to register automatically
& get loaded when i start VC++.It can be done manually by going to the
Addins & macros tab in Tools->Customize etc...as I have done.But I want
to the process to automate it.Can someone give me an idea on how to do
this?Thanks
- 10
- Visual Basic >> How to add a dynamic textbox with MultiLine??? HElP!!!!Hi,
I need to create a dynamic textbox with MultiLine set to True & ScrollBar
set to Vertical.
I have tried to code as below,
dim objControl as Control
Set objcontrol = Controls.Add("VB.textbox", sName)
With objcontrol 'objcontrol
.Move iLeft, iTop, iWidth, 100
.MultiLine = True
.ScrollBars = 2
.Visible = True
End With
But when I run the program, i have an error stating that it is a read-only
property for MultiLine & ScrollBars.
Anyway that I can program to make the textbox as MultiLine & Scrollable when
textbox is created dynamically?
Regards
Vanessa
- 11
- VB Scripts >> Hot to ru multiple programs in one scriptHello everybody
i've the need to create a script that will run as a scheluded job
every day on a windows 2003 server machine.
The script's purpose is pretty simple: it has just to start 4 programs
(all progs have a gui but i dont need it to be visible) with a 10
second delay between each one..
Now due to my very basic scripting knowledge i can't figure out how to
realize this :(
Im trying the run method but only the first program starts, thern the
script wait for it to be terminated and start the second one etc...
while i need that all the program start.
This is the crappy code i wrote:
Dim oWS
Set oWS = CreateObject("WScript.Shell")
oWS.Run "C:\Applicativi\PssServer\PssServer.exe"
oWS.Run "C:\Applicativi\Dispatcher\dispatcher.exe"
oWS.Run "C:\Applicativi\CaricaBiglietti\CaricaBiglietti.exe"
oWS.Run "C:\Applicativi\NotificaQuote\StockQuote.exe"
Any help would be greatly appreciated
- 12
- Visual Studio C++ >> How to impersonate (any MS reps - assistance appreciated)As near as I can tell, you have to invoke "LogonUser()" in order to retrieve
another user's token so you can impersonate them. However, for WinNT/2000
(not XP), the SE_TCB_NAME privilege (act as part of the operating system) is
required to execute this. Does anyone know why such a restriction was ever
implemented. It seems crazy that a running thread has to go through the
trouble of activating this privilege just to impersonate a user (assuming it
even has the authority - and then what, deactivate the privilege when
done?). The only other way I can see involves unravelling KB article 180548
which is ridiculously complicated for such a standard task. Can someone
elaborate on this? Thanks.
- 13
- Visual Basic [VB] >> flexgridHi all,
I'm using component one's flexgrid (nonclassic) and I have a question... How
could I
drag and drop ROWS???
(from a component with my flexgrid and another component with flexgrid)
Thanks a lot,
Xavi
- 14
- Mcse >> Re: OT: Too many posts> When I was in high school, "Moby Dick" was required reading. A couple
> of years ago, I picked up a copy and re-read it. What a wonderful
> book. Just recently I found a copy of Robert Louis Stevenson's
> "Treasure Island"and "Kidnapped".
>
> I was just as enthralled with the tales as I was when I first read
> them as a boy.
>
> Good stuff.
I find it interesting that you read novels in your spare time. I like to
watch pr0n.
--
aka
Doom MCNGP #38
Is that a burdizzo in your pocket or are you just glad to see me.
- 15
- Visual Basic >> 3d box for Beginner?? Please HelpHi All
I am trying to make 3dbox but I don't know about 3d display in 2d plan.
I have to display according to View Distance, XY Angle, and Z Angle
I have 2 types of data
Type Point
X As Single
Y As Single
End Type
Type Box
Pt1 As Point
Pt2 As Point
Pt3 As Point
Pt4 As Point
Height As Single
End Type
I am trying to create function like this. But I don't know 3d Math
formula.So it makes me big problem.
Public Function DrawBox(DC as pictureBox, dBox As Box, ViewDist As Single,
XYAng As Single, ZAng As Single)
End Function
Is it possible to do it. If it could Please some one help me.
Amrit
|
| Author |
Message |
habitatmom

|
Mcse >> Re: Realexamquestions.com study guides are best of all for IT certifcations
>allitcertkiller study guides
pervert
Kline Sphere (Chalk) MCNGP #3
Visual Studio212
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ Mcse |
- Next
- 1
- VB Scripts >> Getting output from excel back to vbscript..I have a vb basic script that automates an excel spreadsheet, it opens the
spreadsheet and then runs an macro. This macro takes a long time to run and
I want to be able to output status information to the vbscript that lauched
the command.
Is there anyway to do this? is there any kind of stdout stream that my macro
can write to that I can read in my script? I'm looking for a clean and
"correct" solution. I don't want to write to a file in the macro and then
read the file in my script.
Basically when my user runs the script the screen should read something like
this:
c:\cscript thescript.vbs
The script has been started!
Opening excel...
Starting the excel macro... <-wscript.echo in script
10 rows processed <- This would come from the macro, somehow
100 rows processed <- from the macro
Macro complete. <-wscript.echo in script
Script complete.
c:\
Is this possible?
- 2
- 3
- Visual Basic [VB] >> Copying from one db into anotherHi
I am trying to copy data from one db into another. Thanks for everyone who
suggested ways to do that. After some more research I have come up with the
below simple looking way. My question in, is it supposed to work this way
and will it work?
LocalConn.Open()
Dim DBCommand As New System.Data.OleDb.OleDbCommand("SELECT id, name, date
INTO (localtable) FROM remotetable IN [Data Source=<ip address>;Initial
Catalog="RemoteDB";Persist Security Info=True;User
ID="username";Password=password];", LocalConn)
DBCommand.ExecuteNonQuery()
LocalConn.Close()
The remote db is a sql server.
Many Thanks
Regards
- 4
- VB Scripts >> Script to Auto Insert Images into MS FrontPage?I need a script that will examine a folder to discover all the files (jpg
images) in the folder and then create html that displays the images in my
current FrontPage web page . I can then move the images around on the page
and then save the page which will place the images in the web's images
folder.
If I do it manually using Insert/Picture etc then I get html which looks
like:
<p><img border="0" src="../../Data/LEASURE/Places/Newbury/DSC01160.JPG"
width="480" height="640">
I am puzzled that the drive and highest level folder which contains the
image is not shown.
I have only a little experience of VB and none of using VBA in FrontPage (if
VBA CAN be used in FrontPage)
any thoughts?
Davy
- 5
- Visual Basic [VB] >> DatagirdView in VB.netHi
I'm working with datagrid view and I want that one line of the columens will
be with more than one cell somthing like this:
--------------------------
| a | b | c |
| | | |
--------------------------
| | | |
| | | |
| | ---------
| | | |
| | | |
| | ---------
| | | |
| | | |
--------------------------
| | | |
| | | |
| | ---------
| | | |
| | | |
| | ---------
| | | |
| | | |
--------------------------
| | | |
| | | |
| | ---------
| | | |
| | | |
| | ---------
| | | |
| | | |
--------------------------
any idea how to do it, i tried to use combobox but it didn't work well
Thanks
- 6
- 7
- VB Scripts >> Using onmouseover on Image Map of the USA<Table><TR>
<! Wyoming ->
<TD><area shape="polygon" coords="119, 68, 111, 111, 132,
115, 168, 119, 173, 77, 146, 73, 119, 68" a
href="NPAGEA.asp?STCODE=WY">
<Style="CURSOR: hand; BackGround-Color:Yellow"
onmouseover="this.style.backgroundColor='Red'"
onmouseout="this.style.backgroundColor='Green'"></TD></TR>
</Table>
I am trying to write a Geography Test for students. I am
using the above code to try to change the color of the
State they position their mouse. It goes to the page on
the question I have for that State of the Union, but I
cannot get the color to change inside the polygon on the
image map. Does anyone know what I am doing wrong or if
it can be done?
Thank You in Advance
Tony
- 8
- Mcse >> Protect Your Windows Network: From Perimeter to Data ( By Steve RiHello,
Something good to all IT Pro . The book is written by Steve Riley who was in
India
last week for his seminar on "Security Briefings" .
URL to get book :
http://www.awprofessional.com/bookstore/product.asp?isbn=0321336437&rl=1
Promo code : JJSR6437
Use above promo code to get good disocunt .
The book is focused on specifically on Windows security .
Every1 must read the book . i havent bought but will buy sooner !
Regards,
--
Amey Abhyankar.
[ M.C.P. Since 2002 ; M.C.S.E. Windows 2000 ; M.C.S.A. Windows server
2003 ; M.C.S.E. Windows server 2003 ]
- 9
- Visual Basic >> ListBox selectionI have several list boxes on a form. I want to fill the first one at run
time, and based on the user's selection from that list box, fill the second
one, and so on. If there is only one item in a list box, I want the program
to select that item automatically and move on to the next list box. How do I
get the program to do this (i.e. simulate the Click event for that list box)?
Dan
- 10
- MFC >> Does MSHTML handle script?When a web page contains script codes like JavaScript or VBScript, IE
can view the page correctly as long as you don't make configurations to
disallow it.
I am wondering where does IE handles these scripts. Something out of IE
like WSH, or something inside IE? Can I do that in MSHTML?
If a page contains a piece of script that draws an image at a certain
location, can MSHTML understand that?
I mean, in the HTML DOM tree, there is only a script element;
or, there are two elements - the script element and the image element?
Thank you.
- 11
- Mcse >> Exchange 2000 - move existing server to new hardwareI need to move our exchange 2000 server to a new hardware
and need some advice.
In Microsoft Knowledge Base Article - 297289 - a method
is described where the the computer account is reset so
that the network name can be reused with the new
hardware - Has anyone done that before?
I seems to me that will be safer and easier to a add
second exchange server to my environment and then after
all mailboxes and folders have been moved/replicated I
can just demote the first/old server...
appreciate all comments of professionals who have been
down that road before
thanks
- 12
- MFC >> How to filter lower case characters in an edit control?Hi to all,
I created a class that enherits from CEdit and overrode its OnChar() message
handler to intercept the entered keys and filter only those that are lower
case. It also verifies if an entered key is upper case to convert it to lower
case and filter it.
Everything works good except the conversion from upper to lower case. The
problem is that even if the OnChar() handler does convert the character to
lower case, the character is still displayed in the edit box as it was
entered, i.e. in upper case.
Please note that if I remove the line: "nChar = tolower(nChar);", the upper
case characters will be rejected and this is not what I want. I want the same
behaviour than the edit control's Lowercase property, which will convert all
characters to lowercase as they are typed into the edit box. However, this
property allows all other character types to be output.
Here's the code of the OnChar() message handler:
#define BACK_SPACE 8
void CEditLoCase::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
TRACE("OnChar(): %c ; %d\n", nChar, nFlags);
// Filter all the characters in 'm_pFilter' to be processed.
nChar = tolower(nChar);
if ((nChar >= 'a' && nChar <= 'z') ||
nChar == BACK_SPACE)
{
CEdit::OnChar(nChar, nRepCnt, nFlags);
}
else
{
MessageBeep(MB_OK);
}
}
I appreciate any help and thank you in advance.
Geo
- 13
- Visual Basic [VB] >> button to get a directoryHi,
I have a textbox where users can enter a directory which the program then
uses. How can I add a button to let the users select a directory and the
selected directory be placed in the textbox? (I know how to add a button,
but I don't know the code for this).
Thanks
Joris De Groote
- 14
- 15
- Visual Basic [VB] >> Can't find this oneOkay, DataGrids.... lovely lil buggerz
I have a dataset, that has a table with 4 rows. I databound the datagrid to
this, but, here's what I would like to do.... I would like to add a
CheckBox Column as the first column of this bound datagrid, and the CheckBox
value has nothing to do with the underlying table. It's to tell me, as I
parse through the rows of the datagrid, if I need to do a perticular action.
I have searched for 5 hours and really have come up to a loss....
Thanks
Sueffel
|
|
|