|
Cory Kimble wrote: .SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _ Global.System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\myTest.mdb")>
This says that if there is a ConnectionString, return it from the settings in your app's settings. If there is no setting available, return the DefaultSettingValue instead. Id' look in your app setting Project/Properties for a value for the connection string.
|
|
|
|
|
So, how do you suggest I solve my issue.
In folder C:\VS2005 InYardTrucks I have a database myDatabase(We will call it Database1). This is where I have the build go to. In C:\VS2005 InYardTrucks\bin there is a copy of myDatabase(We will call Database2). When I do a fill the dataset is filled with the Database1 data. When I update the dataset it writes it to Database2. So When I run the program again Database 1 overwrites anything in database2.
How do I fix? Where do I need to look to find the code that does this? Do I need to change my build location to the bin folder? Do I need to repost this to see if anyone knows?
Thanks.
I found the problem. the database had a output directory property set to 'Always copy' and I changed it to "Never copy'
Thank you.
-- modified at 11:50 Friday 31st August, 2007
|
|
|
|
|
I'm not seeing how this would cause the problem you described. I'm still wondering how you got a bin folder inside a bin folder in your project's directory structure.
|
|
|
|
|
hi
i want to do windows hook programming .i am a beginner and am not able to understand codes given as examples in internet.could any one give me a good example and reference links for doing hooks programming and api programming.
i have to record and replay the keboard and mouse events thats my main requirement.
with regards
Balagurunathan.B
|
|
|
|
|
The terms "beginner" and "windows hook" don't belong in the same paragraph, let alone the same sentance. Windows Hooks are an advanced topic, especailly the CBT hook that you're looking to use.
If you can't understand the stuff you've already found, pointing you to more links probably isn't going to help. Also, how are we going to be able to explain it to you in a much shorter forum post?
This article[^] is about the only one I've found that explains the hook and how to implement it in a managed class. If this goes over your head too, I have no idea how to explain it to you.
|
|
|
|
|
thanks for link .
with regards
Balagurunathan.B
|
|
|
|
|
hi All,
am creating an application to search the Grid, i master that in SQl db, no am using Access for this Application. i have an adapter , at the moment am using a Wizard. and i have this SQl statement that works fine when i run it in Query analyzer, but when i drop it in the Adapter it give the Following Error.
OleDbCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.
Here is an SQl statement in the adapter.
SELECT Actual_Extent, Boundary_Area, Compl_Boundary_Area, Current_Values, Extension, First_Prop_Address, Improved_Value, Improvements_Value, Lis_key, Num_key, Own_Name, Parcel_No, Parcel_Portion_No, Primary_ID, Prop_Address, Purchase_Date, Site_Value, Street_Name, Street_No, Title_Deed_No, Values_Effective FROM Property_ValRoll WHERE
(Boundary_Area = ?) AND
(SUBSTRING(Lis_key , 5 , 5) = ? )
This code is working fine only when i remove the substring search like this
SELECT Actual_Extent, Boundary_Area, Compl_Boundary_Area, Current_Values, Extension, First_Prop_Address, Improved_Value, Improvements_Value, Lis_key, Num_key, Own_Name, Parcel_No, Parcel_Portion_No, Primary_ID, Prop_Address, Purchase_Date, Site_Value, Street_Name, Street_No, Title_Deed_No, Values_Effective FROM Property_ValRoll WHERE
(Boundary_Area = ?) AND
(Lis_key = ? )
but i need to Search within the String. how can i achieve that.
thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
|
|
|
|
|
Am replying to my POst, i have post this same thread in other Forum on the Net and i found that Access(Ole) does not support "substring", i replaced substring with the "mid" function and my adapter was perfectly created. Now from the above query in my adapter i have changed it to
SELECT Actual_Extent, Compl_Boundary_Area, Boundary_Area, Current_Values, Extension, Improved_Value, First_Prop_Address, Improvements_Value, Lis_key, Num_key, Own_Name, Parcel_No, Parcel_Portion_No, Primary_ID, Prop_Address, Purchase_Date, Site_Value, Street_Name, Street_No, Title_Deed_No, Values_Effective FROM Property_ValRoll WHERE (Boundary_Area = ?) AND (MID(Lis_key, 5, 5) = ?)
And now i have a Search button that will search the grid from a selection in the combobox and textbox. here is the code.
Dim strErrorMsg As String
Dim strerror As System.Data.SqlClient.SqlError
Try
damixed.SelectCommand.Parameters("Boundary_Area").Value = cmbboundary.Text
damixed.SelectCommand.Parameters("Lis_key").Value = txterf.Text
damixed.Fill(Dsmixed)
If Dsmixed.Tables("Property_ValRoll").Rows.Count = 0 Then
MessageBox.Show("Township was not found")
Else
Dsmixed.Clear()
damixed.Fill(Dsmixed)
DataGrid1.DataSource = Dsmixed
End If
Catch ExSQL As System.Data.SqlClient.SqlException
''''All this will trap all data Problems and Network if available
For Each strerror In ExSQL.Errors
Next
Select Case strerror.Number
Case 17
strErrorMsg = "Missing server"
Case 4060
strErrorMsg = "Missing database"
Case 18456
strErrorMsg = "Missing user name or password"
Case Else
strErrorMsg = strerror.Message
End Select
MessageBox.Show(strErrorMsg, "SQL Server Error: " & strerror.Number, MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch ExcpInvOp As System.InvalidOperationException
MessageBox.Show("Close the connection first!", "Invalid Operation", MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch Excp As System.Exception ' generic exception handler
MessageBox.Show(Excp.Message, "Unexpected Exception", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
When i try to search inserting anput into the textbox , i get the following Error
An OleDBParameter with Parametername 'Lis_key' is Not Containt by this OleDBParameterCollection
i have declared a separate adapter for the combobox "cmbboundary" ,with the following code in it.
SELECT DISTINCT Boundary_Area FROM Property_ValRoll ORDER BY Boundary_Area
What is Wrong with the Parameter that is complaining about
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
|
|
|
|
|
iam validating the textbox in lostfocus event but it is changing values for month to date and viceversa when the day is single digit.
this is the code iam using,please mail how to weite code for validating.thanks
Private Sub txtfromip_LostFocus()
If txtfromip.Text <> "" Then
On Error GoTo errtrap
If Not IsDate(Format(txtfromip.Text, "MM/dd/yyyy")) Then
MsgBox "Invalid Date. Enter Valid Date. Format is 'MM/dd/yyyy'", vbInformation
txtfromip.SetFocus
SendKeys "{home}+{end}"
Else
txtfromip.Text = Format(txtfromip.Text, "MM/dd/yyyy")
End If
Exit Sub
errtrap:
MsgBox Err.Description, vbCritical, "Error No:" & CStr(Err.Number)
Err.clear
End If
End Sub
|
|
|
|
|
You should not use "SendKeys "{home}+{end}"
If you want to select the textbox content try this:
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
|
|
|
|
|
I m trying to connect to the SQL Server 2000 installed in a network machine n have tried to connect with the following connection string:
conn.Open "Provider=SQLOLEDB" & _
";Data Source=192.168.0.5,1433" & _
";Network Library=DBMSSOCN" & _
";Initial Catalog=" & "master"
But i have an error as below;
Runtime-error '-2147467259 (80004005)'
Invalid authorization specification
Pls help me wats goin wrong.
raamay
|
|
|
|
|
|
You are not specifying the security options.
For NT Authentication:
"provider=sqloledb;Data Source=SERVER;Initial Catalog=DATABASE;Integrated Security=SSPI;"
For Sql Authentication:
"provider=sqloledb;Data Source=SERVER;Initial Catalog=DATABASE;UID=SA;PWD=Pass"
|
|
|
|
|
Yes i added the security options and now i get the error 'SQL Server doesnot exist or access denied' . I m sure the connection string is okey but i doubt we need to configure SQL Server and its remote access properties which i dont find plus dont have any idea what to do & wat to change. So, u got da idea i wud b immensely grateful.
raamay
|
|
|
|
|
That looks like a conection problem,
First try to ping the server from Dos by it's name, it should at least resolve it's ip address
Then from the client machine try this:
Start
Run
CliConfg
And then set the "Default network library" to "TCP/IP"
If it still not working try
Telnet Server 1433
If it says that could not connect, then you have a network problem!
-- modified at 12:00 Wednesday 29th August, 2007
|
|
|
|
|
thanx n i tried every thing as u suggested. i tried pinging n it works plus moved to the second step whereby the Default network library is already set to "TCP/IP". And the 3rd one, there is no msg at all. it starts by saying connecting to the server and then disappears.
infact i wanted 2 say tht my network is a very small network n i m 100% confident it doesnt 've a problem. Probably i think i must use Sql Server authentication because during installation, i made the all authentication based on windows. Plus, i get the error "Login failed for user 'server\Guest'" now. i tried the sa login but failed to connect.
Any way thanks 4 ur support, pls lemme know further if u get any ideas.
raamay
|
|
|
|
|
Hi
I am generating a word document in visual basic.Net. I need to know how can i add header and footers in document programatically. Also there is a picture in it i want to set its layout programatically
Salman Sheikh
|
|
|
|
|
There are probably more elegant ways of doing it, but one way that has worked for me is to create an example document in Word, save it as an xml file, and open the xml file with .net studio.
After that you can simply manipulate the xml file any which way you like, with your code, and finally save it programmatically as a Word doc.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi,
I need some help in transmitting video data. I am using Visual Basic.NET
All the codes i have been seeing are in C, C++, or C#. Can somebody help me with thesame code in VB.NET
Thanks.
|
|
|
|
|
All the code you see will use DirectX. The C# code in particular is trivial to use from your app in a dll, and should not be hard to convert, either manually ( thus teaching you how it's done in VB ), or with an online or downloadable converter.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, in vb6 if i want to delete a single line of code where the cursor is located, I need to press Ctrl+Y . So I have a question how could I do that in VB2005. Thank in advance.
|
|
|
|
|
if u move your mose to the left towards the line numbers, the pointer will change direction just before reaching the line numbers, clicking when the pointer is like this will select a whole line and can be used to select multiple, then you simply press delete. However, there may be a vb.net equivalent for what you are saying and perhaps google ca help you there.
|
|
|
|
|
i want importing csv file in microsoft office spreadsheet 11 control using vb.net at runtime please help me
sathish
-- modified at 5:45 Tuesday 28th August, 2007
|
|
|
|
|
I'm using VB.NET 2005. And I'm creating DataGridView of items one row each, you can create, edit or delete them, but I can only delete the item under the circumstance that no one has this item. What I want on the code is that the row can't be deleted if the code finds out someone has the item. The problem is that I can't stop the deletion of the row. How do I code to allow deleting a row or not?
Please offer any advice. Thank You Very Much
|
|
|
|
|
alurora wrote: the circumstance that no one has this item
You how is your code supposed to know this?? What qualifies as "someone has this item"?? What item?? How is the status of who owns this item maintained?? Without knowing the answers to these questions, it's impossible to tell you anything useful.
|
|
|
|
|