473,378 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

empty path name is not legal

Expand|Select|Wrap|Line Numbers
  1.  Try
  2.             Dim cn As New SqlConnection("Data Source=MSR\LOCAL;Initial Catalog=Eventena;Integrated Security=True")
  3.             cn.Open()
  4.             Using cmd As New SqlClient.SqlCommand("INSERT into BirthdayRegistration where Name='" & TextBox4.Text & "',LastName='" & TextBox2.Text & "',Email='" & TextBox5.Text & "',StreetNo='" & TextBox6.Text & "',Main='" & TextBox7.Text & "',Area='" & TextBox8.Text & "',City='" & ComboBox1.Text & "',State='" & ComboBox2.Text & "',BirthdayName='" & TextBox1.Text & "',BirthdayDate='" & DateTimePicker1.Text & "',Time='" & TextBox3.Text & "',Food='" & ComboBox3.Text & "',Guest='" & TextBox9.Text & "',Cost='" & Label19.Text & "',BirthdayVP=@BirthdayVP", cn)
  5.                 cmd.Parameters.Add(New SqlClient.SqlParameter("@BirthdayVP", SqlDbType.Image)).Value = IO.File.ReadAllBytes(a.FileName)
  6.                 i = cmd.ExecuteNonQuery
  7.             End Using
  8.             If (i > 0) Then
  9.                 MsgBox("Inserted" & i & "record successfully", MsgBoxStyle.Information)
  10.                 BirthdayPaymentMode.Show()
  11.                 clear()
  12.             End If
  13.         Catch ex As Exception
  14.             MessageBox.Show(ex.Message)
  15.         End Try
  16.         cn.Close()

I'm displaying the image and the cost from 1st table in data grid.

I'm displaying in label data is cost and the image in picture box.

This image of picture box and the cost of label should have to store in 2nd table.. while doing this it shows empty path name is not legal.
Oct 21 '16 #1
1 1527
Frinavale
9,735 Expert Mod 8TB
What is the variable a?
It is not declared in the above posted code.
Oct 26 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alan Silver | last post by:
Hello, I have the following line of code in a script... litMsg.Text = Server.MapPath("/"); where litMsg is an ASP.Net Literal control. When I try and run this page, I get the error ... ...
4
by: Chas Stapleton | last post by:
I have recently uninstalled VB5 and installed vb.net 2002. In working on an application, I attempted to add a picturebox and add an image... I immediately received an "empty path name is not...
6
by: Sigmathaar | last post by:
Hi, while making an XML parser for the creation of an entire directory list I got this problem and I'm having trouble solving it. The program (not yet written) goes through an XML Schema Instance...
0
by: snabakvinod | last post by:
Hi, In VC8 project release mode, using __FILE__ macro and compiler option /FC, I can get the full path name with all small letters(Ex: c:\testvc8project\samplefilename.cpp). But I could...
0
by: Vinod | last post by:
Hi, In VC8 project release mode, using __FILE__ macro and compiler option /FC, I can get the full path name with all small letters(Ex: c:\testvc8project\samplefilename.cpp). But I could not...
1
by: alain MONTMORY | last post by:
Hello everybody, I am a newbie to python so I hope I am at the right place to expose my problem..... :-http://www.python.org/doc/2.4.2/ext/pure-embedding.html 5.3 Pure Embedding I download the...
6
by: delusion7 | last post by:
I'm not really sure I'm going about my problem the right way or not. What I want to to is have a save button, bring up the save dialog, and save a report from reportViewer(.rdlc) in .pdf format. ...
2
by: ranjith konnoju | last post by:
hi, i am getting an exception while populating the data in the datagrid. am getting the values into datatable and binding it to the datagrid but it is not displaying the data and giving...
2
by: ranjitkumara | last post by:
Hi All when i am calling libencode.so from function using external library(libtest.so) i am getting below error in db2diag.log means ,its n't able to get the proper GCC library from DB2 Datatbase....
3
by: shaliniraji | last post by:
Hi Everyone, I am developing 1 desktop application to my friend office,in that application i can store multiple images and i can retrieve the information for the same..My issue here is after...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.