I have a simple query that returns the data in a field.
selectstring = ("select invoicecompleted from mainjobdetails where jobno='" & jobnumber & "'")
cmdselect = New SqlCommand(selectstring, dbconnection)
status = cmdselect.ExecuteScalar()
I have a simple query that returns the data...
Dim jobnumber As String = Request.QueryString("JobNo")
Dim dbquerystring As New OleDbDataAdapter("select * from mainjobdetails where jobno=" & "'jobnumber'", dbconnection)
Doesn't seem to load the right data and I am sure I have got the wrong syntax.
'Define the connection
Dim dbconnection As New OleDbConnection("provider=sqloledb;server=(local);database=thardata; uid=sa;pwd=tharSQL")
'Define the querystring
Dim dbquerystring As New OleDbDataAdapter("select * from mainjobdetails where jobno=" & Request.QueryString("JobNo"), dbconnection)...
I am very new to programming and I am trying to bind data to a label/textbox rather than a combobox, grid etc...
The examples I have seen all embed the code within the <asp:label> e.g. <% connectionsting... %>
How do I do it so that it is in same a on_click procedure (this is more logical...
I am trying to use a web.config file to set the connection.
Dim cs As ConnectionStringSettings
cs = ConfigurationManager.ConnectionStrings("publicconnection")
Dim cn As New SqlConnection(cs.ConnectionString)
Dim myadapter As New SqlDataAdapter("select * from mainjobdetails", cs)
I am trying to do something similar, but have an issue with the localhost
Dim emailfrom As String = "email@example.com"
Dim emailto As String = "firstname.lastname@example.org"
Dim emailsubject As String = "Important message"
Dim emailbody As String = "Thanks for reading this"...
I have found some source code on the web, but I still get an error in IE
Sub button_click(ByVal s As Object, ByVal e As EventArgs)
'create the mail message
Dim mail As New MailMessage()
'set the addresses
mail.From = New MailAddress("email@example.com")...
I am new to programming and I am using a book as a tutorial.
I am trying to send email using a button click, but I get an error message saying that mailmessage is used before it is assigned a variable.
<%@ Import Namespace="System.net.mail" %>
Sub button_click(ByVal s...
This is my declaration block:-
Dim mailmessage As SmtpClient
"Sending Mail!", _
However, Web Developer Express errors saying that mailmessage is used before a value is assigned. Any thoughts?