|
Is this a question that belongs in the SQL forum ? I am confused as to what you're asking, what you're using, and where VB comes in to it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
If this is a SQL-server then use the "yyyyMMdd" format in the sql string.
Otherwise you can have that sql-server sees the month as the day and visa versa.
|
|
|
|
|
hi,
i got solution...
i have changed dd/mm/yyyy to dd.mm.yyyy
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Tom above give you much better solution, since "yyyyMMdd" is ISO standard date that sql server understands, if you migrate your sql server to a computer with some other culture set (let's say US) then this date format you wrote "dd.MM.yyyy" is not good, since sql server again does not know which is day and which is month. Either use "yyyyMMdd" or use parameters.
SQL server understands ISO date, and date that is set as it's default culture, and he will behave different on US set server (MM/dd/yyyy) and different for lets say german set server (dd.MM.yyyy).
|
|
|
|
|
I'm new to programming and also struggled with dates and sql a while ago. I tried various date formats but could not get one to work consistently - my day and months would swap around. The yyyyMMdd format worked, but I didn't like the look of it. I then looked into sql parameters and that works perfectly. I would strongly recommend using parameters.
|
|
|
|
|
Hi All,
I have generate problem while i am trying to send mail using guest account.
Error is given Below.
Access to the path 'Global\.net clr networking' is denied
i think it can solution using CASPOL.exe.
So please help me to use CASPOL.exe for applying fulltrust to my application.
Thanks
If you can think then I Can.
|
|
|
|
|
This is STILL not a programming question. It STILL has to do with security configuration on your machine. You STILL do not explain how you're sending mail to get this error. You've had this issue for days, but you can't take the advice you've been given to try to clarify the problem ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
The Guest account has permissions to NOTHING. Run your app under a normal user account instead. Developing for the Guest account is ludicrous since noone ever enables that account, and if they do, they should be taken out back and shot.
|
|
|
|
|
But my software requirement is sending mail BY USING guest account.
If you can think then I Can.
|
|
|
|
|
Unless the admin open up the rights to the Guest account, you're sunk. You simply have no options since the Guest account is not allowed, by default, to do what you want.
|
|
|
|
|
hi, im not very good at deployment and im facing this problem:
I've finished my application and build the executable file using Setup Project. Anytime i want to access the database the application trows an error.
This is my connection:
myConnection = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Selom\Documents\Visual Studio 2005\Projects\Printing And Copy1\Printing And Copy1\Database1.mdf;Integrated Security=True;User Instance=True")
Please I need help!
Please i need to know what is wrong with my connection.
modified on Wednesday, July 15, 2009 7:12 AM
|
|
|
|
|
Standard Question #1: What's the error message??
Does this path exist on the machine you're installing the app on:
C:\Users\Selom\Documents\Visual Studio 2005\Projects\Printing And Copy1\Printing And Copy1\Database1.mdf
Somehow, I doubt it. For examples of connection strings and what the proper format for each type of connection to each database would be, consult ConnectionStrings.com[^]
|
|
|
|
|
thanks for replying, actually, this my code:
Private Sub frmColour_Copy_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim con = = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Selom\Documents\Visual Studio 2005 \Projects\Printing And Copy1\Printing And Copy1\Database1.mdf;Integrated Security=True;User Instance=True")
Dim cmd As New SqlCommand
cmd.Connection = con
cmd.CommandText = "INSERT INTO customer(cust_name, cust_Age) VALUES( '" + strCustName+ "', '" + strCust_Age + "')"
cmd1.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show("Error while inserting record on table..." & ex.Message, "Insert Records")
Finally
con.Close()
End If
this code works on the pc it's being developed. the only problem is that after building the executable file using the setup Project and installed on the same machine, it displays the following error:
Format of the initialization string does not conform to specification starting ar index 0
thanks in advance for your help!
|
|
|
|
|
Again, if you didn't change the connection string you used to match where the database is installed on the client machine, you'll get an error like this. You used:
AttachDbFilename=C:\Users\Selom\Documents\Visual Studio 2005 \Projects\Printing And Copy1\Printing And Copy1\Database1.mdf
I'm willing to bet that this path doesn't exist on the machine you installed the app on.
|
|
|
|
|
Again, thanks for replying. You are right about the path.
my only trouble is how to change it so that it works after the installation of the application on any machine.
I have changed it into :
Dim constring As String
constring = Application.StartupPath.ToString() + "\Database1.mdf"
Dim con = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=" + constring + ";Integrated Security=True;User Instance=True")
and selected the option "embedded resource" for the database file but it still not working and giving the following error code:
"An attempt to attach an auto-named database for file C:\Program File\App\Customerdb.mdf failed. A database with the same name exits, or specified file cannot be opened, or it is located on UNC share."
Thanks for replying!
|
|
|
|
|
You cannot use the database if it's an embedded resource. Even if you could, it would be entirely ReadOnly. You wouldn't be able to add any data to it or modify it in any way.
The fullyqualified path to the database file should be either written to a config file at install-time or generated, using well-known folder paths, at run-time. It's then just a simple matter of inserting the path into the connection string when needed.
|
|
|
|
|
Thanks for keep on replying sir. I'm quite lost. can you please give me a very simple and well detailled sample.
Thanks for replying!
|
|
|
|
|
Hi every body i am making a windows application and i need to make a button in my menu bar like in the microsoft word where u can find the recent documents that u have opened so i need to display all the forms that i have opened from the newest till the older and when i click i need to open the document
many thanks
|
|
|
|
|
Basically, you keep a list of the files that were opened/saved, and provide menu-items.
An example on the MRU can be found here[^].
Good luck
What sig?
|
|
|
|
|
Whenever any form is opened in your application, check if it is there in the list of recent items. If not found, add it.
|
|
|
|
|
hi everybody
i really need you guys to help me on it, i'm new to VBA know nuts about it.
currently i'm doing a project using excel and macro.
For example i got a spreadsheet which acts like a data its something like this
Site service package price
A 1 78
A 1 78
A 2 128
B 3 175
B 1 78
C 3 175
C 2 128
then from another spreadsheet there is a button to generate them to
Site Total service Total sales
A 3 284
B 2 253
C 2 303
So how do you loop through the spreadsheet and become something like this??
besides that how do you run the form(created in VBA) when u click on one of the button you created?
Thanks
Veon
|
|
|
|
|
To answer the second question first, write a macro to do the job, then insert a button, assign the macro to the button.
Assuming you are running Excel in Office 2007, you click Insert, Shapes, [A Shape of your choice], Draw the shape where you want it to be, Right Click, Assign Macro.
As to the macro itself, I need to have a think and will come back to you, but it is fairly simple I think.
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
hi thanks for reply =)
just that i want a button that i created, and when it is being clicked it would run the Userform that i have created in VBA. its Userform not spreadsheet
so sorry
thanks
veon
|
|
|
|
|
Design the button you require, save it (as a gif say), then Insert Picture and assign a macro to the picture.
The macro would be...
Sub Macro1
Form1.Show
End
Where Form1 was your form to call.
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
Where can I find documentation about the byte() from RegionData.data. Specifically I am trying to figure out how to get a path from it. The regions I will be creating will have several polygons. I want to use the Region manipulation functions (Union, Exclude, etc.) and then create a path from the resulting RegionData.data.
|
|
|
|