Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

john nada

@john nada
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Inserting lots of rows programmatically
    J john nada

    Nice Eric!

    Database database help tutorial question

  • Inserting lots of rows programmatically
    J john nada

    Here's a way to populate the PostalCode column. I would set the default value of the columns CountryCode and WarehouseNum to 1 instead of explictly inserting the value 1 each time. DECLARE @PostalCode varchar(10) DECLARE @Number int SET @Number = 0 WHILE @Number < 100000 BEGIN /* Format PostalCode */ IF LEN(@Number) = 1 BEGIN SET @PostalCode = '0000' + CAST(@Number AS varchar) END ELSE IF LEN(@Number) = 2 BEGIN SET @PostalCode = '000' + CAST(@Number AS varchar) END ELSE IF LEN(@Number) = 3 BEGIN SET @PostalCode = '00' + CAST(@Number AS varchar) END ELSE IF LEN(@Number) = 4 BEGIN SET @PostalCode = '0' + CAST(@Number AS varchar) END ELSE IF LEN(@Number) = 5 BEGIN SET @PostalCode = CAST(@Number AS varchar) END /* Insert PostalCode */ INSERT INTO Wzip_Detail(PostalCode) VALUES(@PostalCode) /* Increment number */ SET @Number = @Number + 1 END

    Database database help tutorial question

  • Attach file and send it as an email
    J john nada

    I don't know what to do exactly without trying it myself, but maybe this can get you started in the right direction.. To upload a file put a file field on your form: When the page is posted back to the server you can access the uploaded file by calling the PostedFile property of the file field: fileUpload.PostedFile Use the InputStream property of the PostedFile to do whatever you have to, for example: Dim img As System.Drawing.Image img = img.FromStream(fileUpload.PostedFile.InputStream) Create the email: Dim email as New System.Web.Mail.MailMessage email.Attachements.Add(img) email.From = "from@hotmail.com" email.To = "to@hotmail.com" email.Subject = "test" email.Body = "hi" Send the email (make sure the Smtp service is running in your IIS server): SmtpMail.Send(email)

    ASP.NET help question

  • How to Execute sql script in vb.net
    J john nada

    ' Create a stream to read the sql file Dim reader As StreamReader = New StreamReader(path) ' Read the contents of the file into a string variable Dim sqlScript as String = reader.ReadToEnd() ' Execute the sql on the database Dim command as New SqlCommand(sqlScript, New SqlConnection(connStr)) command.ExecuteNonQuery()

    Visual Basic database help csharp tools
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups