|
So what is your question?
The linking off the tables you have to do in your database. (on the field 'student_id' in both tables)
The combobox in .NET has 3 property's that might help you:
- Datasource (a datatable containing the values to be displayed in the combobox)
- Displaymember (wich column of the datatable will be displayed in your case probably 'Name' or 'Subject')
- Valuemember (wich column is the actual value of the combobox, in your case probably 'student_id' or 'subject_id')
Without more explanation of what you want exactly nobody here is going to be able to give you a complete answer.
|
|
|
|
|
HI to all,
Could anyone please give me the important steps to be done in order to include vlc player in a project(which will be deployed).
What I did is include a COM components(for vlc player).[I am not sure what COM components,but it works in my system] and ran it,it runs fine. But after I deploy my project it didn't run. I am sure there has to be some settings to be done. Please help me out with. I am a beginner.
Thanks in advance
I am a beginner
|
|
|
|
|
Not sure about this but if the computer that you are installing it on doesn't have vlc player installed it isn't going to work (at least not just 'out off the box').
You'll need to register the com component, in order to do this you can set it in the property's off the component's dll (I think) in your setup project.
|
|
|
|
|
In VB, how does one obtain the "Type" info of a file? For example, in a Windows file dialog (Details view) one of the columns provides the native application info for each file. The Type info for a .fun file is "Kool Moves Document" - .doc's Type is "MS Word Document," and so on. How do I get this info for a ListView control in my application?
|
|
|
|
|
SHGetFileInfo[^] >> SHGFI_TYPENAME
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks! Looks complicated, but will get it phiggered out.
|
|
|
|
|
If you aint good in API then you can do this through registry
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi All,
I am using the following code to send EMail
Public Function SendmailUsingSmtpClient(ByVal destinationEmail As List(Of String), ByVal subject As String, ByVal body As String) As Boolean ', ByVal pblnNotify As Boolean) As Boolean
'Dim Email As New System.Net.Mail.MailMessage
Dim mailClient As SmtpClient = Nothing
' Dim smtp As New System.Net.Mail.SmtpClient(BLLmdlCommon.SmtpServer, BLLmdlCommon.SmtpServerPort)
Dim cred As NetworkCredential = Nothing
Dim smtpserver As String = ""
Dim SendPassword As String = ""
Dim fromMail As String = ""
Dim smptServerPort As String = ""
Dim SendUserName As String = ""
Try
SendPassword = System.Configuration.ConfigurationManager.AppSettings("fromemailpassword").ToString()
fromMail = System.Configuration.ConfigurationManager.AppSettings("FromEmail").ToString()
smtpserver = System.Configuration.ConfigurationManager.AppSettings("smtpserver").ToString()
smptServerPort = System.Configuration.ConfigurationManager.AppSettings("SmtpServerPort").ToString()
mailClient = New SmtpClient(smtpserver, smptServerPort)
' mailClient.EnableSsl = True
mailClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
mailClient.UseDefaultCredentials = False
cred = New NetworkCredential(fromMail, SendPassword)
mailClient.Credentials = cred
For i As Integer = 0 To destinationEmail.Count - 1
mailClient.Send(fromMail, destinationEmail(i), subject, body)
Next
Return True
Catch ex As Exception
Throw ex
Return False
End Try
End Function
It is working fine at local. When i check at production server, it is crashing, Cannot get IIS pickup directory
Can you tell me something , Whay should i do to get rid of this problem?
Thanks
|
|
|
|
|
am using vb.net
i got error to inserting the values
error is
ERROR [HY000] [DataDirect][ODBC OPENEDGE driver][OPENEDGE]Invalid number string (7498)
my code
<code>
Dim sVechicleQSLString As String = "insert into PUB.RCMIFT values(3176,842,1663,1,'Salik','Salik road toll','BDMON','Vehicles','A',0,0,1,0,'01/01/1996',0,'',0,0,5,0,2,0,4.40,0,0,0,0,0,0,0,0,0,'','',0,0,0,0,'',0,40.00,0,0,0,0,176.00,'support','',0,0,0,'03/10/2009',11.26,'BDMON','','',03/10/2009,11.26,'',0,0,0,0,0)"
Dim conn = New System.Data.Odbc.OdbcConnection("Dsn=BPB;uid=CWM;host=102.168.0.196;port=6500;db=rental;password=")
conn.Open()
Dim sfcomVehicleSearch As New System.Data.Odbc.OdbcCommand(sVechicleQSLString, conn)
sfcomVehicleSearch.ExecuteNonQuery()
conn.CLOSE()
Dim da As New System.Data.Odbc.OdbcDataAdapter()
sVechicleQSLString = "Select * from PUB.RCMIFT ORDER BY RCMIFT-ID"
sfcomVehicleSearch = New System.Data.Odbc.OdbcCommand(sVechicleQSLString, conn)
da.SelectCommand = sfcomVehicleSearch
Dim ds As New DataSet()
da.Fill(ds, "Rental.vsrfvr")
dgvFill.DataSource = Nothing
dgvFill.DataSource = ds.Tables(0)
End Sub
</code>
pls help me
Thanks
Vicky
|
|
|
|
|
Use parameters.
From the error I can only think that somewhere in that mess off numbers there is one badly formated.
If you use parameters they will take care off the formating and avoid these kind off errors.
(If you don't know what parameters are look into sql injunctions (google it))
Also although its a correct sql statement, better practice is to include the column names into your sql.
example: INSERT INTO [tablename] ([columnname],[columnname],...) VALUES (?,?,...)
And a better subject might be in order as well. Hi all doesn't really say much and many people here will skip the post because off it.
|
|
|
|
|
Take a look at the last date, just after 'BDMON' -you have not enclosed it in quotes.
I would also read up on SQL INJECTION ATTACKS as your code is wide open to abuse.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Iv got 2 sql tables..
table1 - date, runNo, coop
20090101 C1234 B0018
20090211 C1234 B0150
20090228 C5678 BRT10
20090228 C5678 BP001
table2 - coop, runNo
B0001 C1111
B0002 C2222
B0018 C1234
B0144 C5555
B0150 <null>
BRT10 <null>
BP001 C5678
BP110 C8888
I have to check in table1 for coop wif runNo wether the coop in table2 got that runNo and display the one that dont have runNo like the one in table1. Table1 is data that i extract from a file. all the list in that file means that coop <brt10> have files for running number <c5678>. so for table2 are the list of files in portal. so i must checked wether coop in portal got the rite file that is for table2, coop<brt10> must have runNo <c5678>.. if the coop in portal (table2) dont have that file(runNo) than i have to display the coop that dont have that runNo. I dont how to compare bcos its not comparing the 1st row in table1 to 1st row in table2. the flow is to search data in 1st row of table1 within table2..
|
|
|
|
|
Not sure I understood correctly, but it seems a simple SQL statement can do it, by joining (JOIN) both tables on their coop fields, then filtering (WHERE) on different runNo fields.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
thank u so much.. never think of join the tables.. do u have any link that explain on how to use JOIN? iv been trying to google it but most of the explanation r not clear.. tq
|
|
|
|
|
|
got it.. thanks a lot
|
|
|
|
|
This is a snippet of my code.
Declare Function ReadProcessMemory Lib "kernel32" _
(ByVal hProcess As Long, _
ByVal lpBaseAddress As Long, _
lpBuffer As Any, _
ByVal nSize As Long, _
lpNumberOfBytesRead As Long) As Long
Dim bytearray As String * 65526
Dim GetWindowsFormsID As String
Call ReadProcessMemory(processHandle, bufferMem, ByVal bytearray, size, lp)
GetWindowsFormsID = ByteArrayToString(bytearray, retLength)
Function ByteArrayToString(bytes As String, length As Long) As String
Dim retValStr As String
Dim l As Long
retValStr = String$(length + 1, Chr(0))
l = WideCharToMultiByte(CP_ACP, 0, bytes, -1, retValStr, length + 1, Null, Null)
ByteArrayToString = retValStr
End Function
I am sure the bytearray is not empty. But I don't know how to convert it to String. I use WideCharToMultiByte but it's failed. What am I doing wrong?
|
|
|
|
|
OK, this is solved (and also this question). The issue is actually convert WideChar string into ANSI string. I use CopyMemory instead of WideCharToMultiByte.
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Function ByteArrayToString(bytes As String, Length As Long) As String
Dim retValStr As String
retValStr = String(Length - 1, Chr$(0))
CopyMemory ByVal StrPtr(retValStr), ByVal bytes, Length * 2
ByteArrayToString = retValStr
End Function
modified on Wednesday, March 11, 2009 1:04 AM
|
|
|
|
|
hi all !
i m using an HttpWebRequest to 'read' a web page wich is returned in english BUT when i use internet explorer/mozilla
i get the page in French (my regionnal settings and my windows are in french)
I want to get the page in french using the HttpWebRequest, do you know how i can do this ?
|
|
|
|
|
using an header i manage to get the page in french :
l_req is the HttpWebRequest
code in vb.net :
l_Req.Headers.Add("Accept-Language", "fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3")
|
|
|
|
|
hai all,
i wrote a program in windows service name as acs_service.
i taken setup name as win_sersetup this windows service name as acs_service to .exe.
then i install this service setup name as win_sersetup.
after installation this service setup name as win_sersetup,
i want to list the service name as acs_service automatically in services inside administrative tools in control panel(controlpanel->administrative tools->services).i want to start and stop the service name as acs_service.
but after installation,the service name as acs_service not listed in services inside administrative tools in control panel(controlpanel->administrative tools->services).
so how to list a windows service name as acs_service in services inside administrative tools in control panel (controlpanel->administrative tools->services) after installation the service setup name as win_sersetup.
|
|
|
|
|
In the designer, look at the properties of your setup project. There is a property somewhere that will allow you to set the name that should be shown in the services list.
The default setting of this property is the name of the setup project, that's why it is in the list now.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi All,
I have developed an application in vb.net and it is working fine.
pl suggest me how i keep on top a currently clicked form.
Thanks
rmshah
Developer
|
|
|
|
|
You're not very specific in your description or what you tried, so the standard answer to a question like this is setting the form's TopMost property to True.
|
|
|
|
|
|