|
Hi Friends,
Kindly help by giving some guidelines reg. sending mails from Visual Basic 6.0.
Thanks & Regards
|
|
|
|
|
It's simply amazing what you can find with a little application of Google.
"vb6 send email[^]"
|
|
|
|
|
Hi,
Currently I have a textfile with each line of text corresponding to a specific format.
Eg, the first 3 characters is an ID and the next 8 characters is the phone number
XXX12345678
YYY23456789
Are there any classes within .NET that will enable me to input the format for the lines (3 char ID, 8 char number) and parse each line into an array of strings, or better still, an array of objects?
Thanks!
|
|
|
|
|
r u saying u want to put id n the phone number in one field?
|
|
|
|
|
It's more like:
I have a text file, and each line in the file is formatted in a specific way.
In the example I gave, for each line, the first 3 digits is the ID, and the next 8 digits is the phone number. Was wondering if there are any classes that enable me to specify this format and just pass in each string read from the file in a loop so that they can be "tokenized" according to the format.
|
|
|
|
|
i don't know wether this going to help u bcoz i'm not doing a text file. in my case i want a document number in this format = <yyyymmdd><custid><running number="">
so i get this doc number = 20080403abcd0001
the coding would be like this.
cmd.Parameters.Add(New SqlParameter("@docNo", SqlDbType.NVarChar, 50))
cmd.Parameters("@docNo").Value = System.DateTime.Now.ToString("yyyyMMdd") + CustID.Text + GetRunNo().ToString("D4")
sorry if this not going to help u bcoz i'm new in this.
|
|
|
|
|
Stop with the txt speak. You've got a full keyboard in front of your and you're not getting charged by the character to post anything. It's very annoying and making your posts hard to read when you do this.
|
|
|
|
|
You can use regular expressions to parse this kind of thing.
|
|
|
|
|
Thanks, just what I was looking for!
|
|
|
|
|
How to Bind Controls in GridView in VB.Net or C#.Net (Windows Application)
Can any help me to sort out this..
|
|
|
|
|
Hi,
u can do it using below code.
Note: ds means DataSet
If ds.Tables(0).Rows.Count > 0 Then
GridView1.DataSource = ds.Tables(0)
Else
MsgBox("No data found!!", vbCritical + vbOKOnly)
End If
ds.Dispose()
cheers!!!!!!!!!!
regards,
Rana Krishnraj
|
|
|
|
|
Hi Rana,
I want to bind Controls say Textbox in DataGridView by firing the click event of command button
Regds
Krish Vignesh
|
|
|
|
|
|
Hi David
In my project i want to host Textbox in DataGridView.So i wanna to know how to do this
Krish VIgnesh
|
|
|
|
|
OK. Your question really wasn't all that clear, and I'm suspicious of what you really want to do with this.
If I get your intentions, the DataGridView, by default, uses DataGridViewTextBoxColumns to show/edit data. So, I'm not really seeing what the big issue is here.
myDGV.DataSource = myDataTable
|
|
|
|
|
hi, i'm new in this. i want to display a list of data in my data grid view by the date that have been request. example i want a list from 1 feb 2008 untill 20 feb 2008. but nothing come out from the data grid except the title for each column in my datagrid.
so this is the code. or is it something wrong with my datagrid properties
[code]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim startDate As String
Dim endDate As String
Dim ds As DataSet = Nothing
startDate = y1.Text
endDate = y2.Text
Try
Dim cmd As SqlCommand = New SqlCommand("SELECT * FROM Senarai_Log where Date >= '" & startDate & "' and Date <= '" & endDate & "'", New SqlConnection("Server=MAHANI;Database=SPGALatihan;Persist Security Info=True;User ID=sysadm;Password=sysadm"))
cmd.Connection.Open()
Dim sqlDR As SqlDataReader = cmd.ExecuteReader()
DataGrid1.DataSource = sqlDR
DataGrid1.Visible = True
DataGrid1.DataBind()
DataGrid1.DataSource = Nothing
cmd.Connection.Close()
DataGrid1.Visible = True
Catch ex As Exception
ds = Nothing
Label8.Visible = True
Label8.Text = "NO DOKUMEN INI TIADA DALAM REKOD. SILA SEMAK DI DALAM SENARAI LOG"
End Try
End Sub
End Class
[/code]
|
|
|
|
|
zaimah wrote: Dim cmd As SqlCommand = New SqlCommand("SELECT * FROM Senarai_Log where Date >= '" & startDate & "' and Date <= '" & endDate & "'",
It's best that you learn parameterized queries. The reason it doesn't work is because the dates are in the wrong format and your SQL is improperly written.
I highly suggest reading this[^] to understand parameterized queries and what your wrote it a huge security problem.
|
|
|
|
|
thanks dave for giving me the article that r related. but as i said b4, i'm new in this, i didn't understand much about the article except 4 the error msg explaination. in my prgm the user suppose to enter date in this format "dd/mm/yyyy". so, by saying it's in the wrong format is it means that i should not declare it as string? sorry again for my english is not so good. in what way does my code can make injection attacks happen?
|
|
|
|
|
OK, it sounds like you really need to pickup a beginners book on VB.NET and work through it.
Your database should not be storing dates and times as strings. This makes it very difficult to retrieve a set of records between two dates. They should be stored as SQL Date types instead.
When you go to search the database for records between two entered dates, you have to convert the text entered by the user (this is a string) to a DateTime object. Look at the documentation for DateTime.TryParse[^] for this.
When you get the two dates, you use them as parameters in a parameterized SQL query that does the searching. That's where that article link I posted comes in. That shows you how to setup and use parameterized queries. Concantenting strings together makes for some very bad, and easily breakable, SQL code that can be difficult to find bugs in.
|
|
|
|
|
thanks a lot for ur explaination. i'm really new in this, so many people that r expert in this usually don't entertain a beginner like me. thanks a lot. i will buy the book that u have suggested. one more thing, i'm confuse about one thing, what is the different between vb.net and asp.net? I'm using visual studio. if i see the html view, i can see the word <asp>, so i know it is an asp coding. but if see in the aspx.vb, which is the one that r asp? i'm still confuse in that.
|
|
|
|
|
hi coder!! i am new here on this site.hope i am posting my question at right place
i need help from you.i want to capture URL of already running firefox browser from my vb application.
can anyone tell me from where to start and what to do??
again i want to capture firefox not IE.
waiting for your reply
|
|
|
|
|
You'll have to create a plug-in for Firefox and have it send the URL via interprocess communication to your VB program.
It's not simple, but it's doable.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
thanks
can you tell from where i start to create this plug i.
how to do that?
any reference!!
|
|
|
|
|
|
i need solution in vb.net
there is not any solution that can be done with vb application.
firefox extension is not a solution.i need solution or help such that i can make my vb.net application to get url of firefox.
|
|
|
|