|
Use an OleDb connection, and set the connectionString[^] accordingly.
Good luck
I are troll
|
|
|
|
|
what is "sibprovider" give me this error "The "sibprovider" provider is not registered on the local machine
|
|
|
|
|
It's the driver[^] that you use to talk to the database. There's also one available for ODBC, from EasySoft[^].
Enjoy
I are troll
|
|
|
|
|
I have developed an application using Visual Basic .NET 2008 which uses a MySQL Database. The connection string i use is something like
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
so actually the server is localhost, database name is customers(or watever!), and uid=root and pwd is ***** :P
so everything works fine...now this program is something which i need to run on other computers as well....so do i have to install mySQL server to each and every computer that i need to run this software? cant i get a single database like MS SQL Server ?? .mdf or .sdf??? Plz help me! and if possible please tell me or post a website which can help me deploy the database to another computer to use.
This is a project which i need to submit to my university so plz tell me what files i need to burn on to the CD that im submitting and any special instructions that i should include in the CD to run the project
Thanx loadz in advance
|
|
|
|
|
swaroop09 wrote: so do i have to install mySQL server to each and every computer that i need to run this software?
Yes, you do.
swaroop09 wrote: cant i get a single database like MS SQL Server ?? .mdf or .sdf???
There's no such thing. Even for SQL Server files, you have to install at least the SQL Server Express Edition. You can't just throw an .MDF file on a machine and expect the app to use it.
How do you deploy an app using MySQL?? A little research[^] would be in order.
|
|
|
|
|
Hi All
Im trying desparately to search a sql table image field passing in a parameter which is a byte array. I am having no luck whatsoever. I get this error when i run my code below :The data types image and image are incompatible in the equal to operator.
<br />
Public Sub SearchByteArray(ByVal ByteArr() As Byte)<br />
Dim strSQL As String<br />
Dim oConn As SqlConnection<br />
Dim oCmd As SqlCommand<br />
Dim oBLOBParam As SqlParameter<br />
Dim str As String = ""<br />
' Try<br />
' Create and open connection object<br />
oConn = New SqlConnection("data source=XXX;initial catalog=CustomApps;user id=sa;pwd=xxx;")<br />
oConn.Open()<br />
' Insert statement<br />
' Notice that @BLOBValue is a placeholder for the actual data<br />
strSQL = "SELECT BlobField from MyImageTable where BlobField = (@BLOBValue)"<br />
' Create a command object<br />
oCmd = oConn.CreateCommand()<br />
' Set SQL statement<br />
oCmd.CommandText = strSQL<br />
' Create a command parameter<br />
oBLOBParam = New SqlParameter("@BLOBValue", SqlDbType.Image, ByteArr.Length, ParameterDirection.Input)<br />
' Finally, set the actual data<br />
oBLOBParam.Value = ByteArr<br />
' Add this parameter to the command<br />
oCmd.Parameters.Add(oBLOBParam)<br />
' Execute SQL statement<br />
MessageBox.Show(oCmd.ExecuteNonQuery())<br />
' Close the connection<br />
oConn.Close()<br />
<br />
End Sub<br />
Can anyone help or assist please ?
|
|
|
|
|
Hi,
I am not an SQL or database expert but I would be very surprised if SQL could do record selection based on BLOB content.
I do have one suggestion: you could add an 'imageHash' field to your table, then with an app, calculate and store the image hash value one. Any algorithm would be fine. Later on, when you want to search for an image, calculate its hash value, then search for the hash value.
NB: there is a slim chance a hash search may result in more than one match, so you would still need code to compare the bytes if you want to be absolutely sure you got the right image.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Mates,
hello, i need help. how to run or call rdlc report in vb.net.
why is it that i dont have Me.ReportViewer in code. I added already the reference Microsoft.ReportViewer.WinForms but still. I google already. but their examples has Reportviewer. Is there any something i missed.
Thanks for in advance.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
You won't find a ReportViewer object in your project unless you drag an instance of it from the ToolBox onto your form. Once you do this, it's default name will be ReportViewer1, not ReportViewer.
|
|
|
|
|
why i have the following msg ??
Namespace or type specified in the Imports 'System.Managment' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Documents and Settings\XeleX\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Class1.vb
|
|
|
|
|
Don't cross post on multiple forums. It makes collaborating on an answer very difficult.
One of two things happened. You either didn't set a reference to the System.Management.dll file, or you tried to use a namespace as a class or object.
For the reference, right-click "My Project" in the Solution Explorer, then click on the References tab. Click on the Add button, then in the dialog that pops up, click on the .NET tab. In the list, look for System.Management and double-click it.
If you tried to use System.Management as a class, you need to rewrite your code a bit and use the correct class in that namespace. You can't just specify "System.Management" as expect it to work.
|
|
|
|
|
thanks a lot dave
|
|
|
|
|
Hey,
I'd like to know if there is a way to make a screenshot including the cursor. Normally it comes pretty handy that the mouse cursor isn't displayed, but now I need the darn thing
Any suggestions are welcome,
(Edit: It needs to be done in VB coding, so not some other method :P)
Zaegra
Motivation is the key to software development.
|
|
|
|
|
Well, I've never had to do this, buy you might want to track the mouse position, then try to get the image of the mouse cursor, or just use a standard mouse pointer image you create, and when you take a snapshot, paint the mouse cursor image at the required position.
|
|
|
|
|
What is the most efficient way to do string comparisons that occur very frequently?
The patterns I am checking against are relatively simple, but they must be done quite frequently on a varying types of hardware. Example patterns to match would be similar to:
*Store*
*StoreTest*
*Store###* (### could be any 3 digit pattern
*StoreNightly*
(Anything else that doesn't match the above 4 conditions)
There are several ways that could be used: like operator, compiled regexs, contains method, etc. Is one method generally faster than the others? Can someone guide me to the light as to which would be the most appropriate in this case?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
How about writing a small application to test your methods?? All you would need is a file full of test data and the StopWatch class. How you write a compare method for each method is up to you.
But, IMHO, given your requirements, my bet would be on compiled Regex. This would give the greatest flexibility, though maybe not the absolute best performance. There are trade-off's you have to consider with other requirements you haven't given.
|
|
|
|
|
I thought the regex.compiled method would be the best way, but I found a couple links online stating that the results could largely vary depending on system hardware.
I debated doing the benchmarks on my box, but I don't want to get caught in the "works fine on my box" scenario w/ this method. If the app was running on one specific machine or server, I would have done the benchmarks already and determined the most appropriate one - just trying to figure out what is the best for wildly different hardware requirements.
I just create a test app with the benchmarks and run it on several diff. machines here and get a baseline avg for each method type.
Dave Kreskowiak wrote: There are trade-off's you have to consider with other requirements you haven't given.
Really, this is just a function that needs to check a given string several different ways and then output another string as output. That simple really, but it will be called a ba-zillion times a day.
Thanks anyways Dave.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Just posting the results from my benchmarks in-case anyone else is doing something similar. I had the benchmarks perform with 500,000 iterations with each compare type and then with 2 million each. Benchmarks were performed on numerous machines from a zeon server w/ 16 gig ram to a client box with 512 ram and several in-between.
Fastest to slowest:
1. Regex with RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnoreCase set
2. Contains method
3. LIKE operator
4. Regex with only RegexOptions.Compiled set
#2, 3, 4 would generally end in the order specified above, but not always. #1 always finished as the fastest compare method using regex.ismatch w/ the settings specified.
FYI: I wouldn't use this as the standard for all comparisons done in the future; but rather provided to give you an idea on what options can be used to test against.
#1 seems to be the best performer for this particular routine and the numerous checks being done. Your results may vary as defined by your needs.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
How to use spell checker in vb.net
|
|
|
|
|
|
Wouldn't that be covered in the documentation you have on the spell-check component you're using??
|
|
|
|
|
In Visual Studio 2005 .Net, How can you programmatically edit the string value for a Gridview SqlDataSource SelectCommand?
For example, I need to conditionally replace SelectCommand="Select * from [Table1]" with SelectCommand="Select * from [Table2]"
Code snippet Example:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1">
<Columns&>
<asp:TemplateField HeaderText="Office Number" SortExpression="O Number">
.... etc..
<asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status">
<HeaderStyle BackColor="#EBFFEB" />
</asp:BoundField>
.... etc..
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=(serverName);Initial Catalog=(databaseName);Integrated Security=True" SelectCommand="Select * from [Table1]"</asp:SqlDataSource>
-
I have tried various AsP <%#variable%> techniques without success.
-
I have also tried the following (in the Page_Load and a Button1_Click sub) :
Dim SqlDatasource1 As New SqlDataSource
Dim GridView1 As New GridView
Dim sSQLDataSource As String
sSQLDataSource = "Select * from [Table2]"
Dim SqlConnectionString As String
SqlConnectionString = "Data Source=(serverName);Initial Catalog=(databaseName);Integrated Security=True"
SqlDatasource1.ConnectionString = SqlConnectionString
SqlDatasource1.SelectCommandType = SqlDataSourceCommandType.Text
SqlDatasource1.SelectCommand = sSQLDataSource
SqlDatasource1.DataBind()
GridView1.DataSource = SqlDatasource1
GridView1.DataBind()
-
Any enlightenment with what I'm missing with the Bound GridView would be greatly appreciated.
|
|
|
|
|
Just in case this can help anybody else, the only solution I was able to find around the Bound GridView SelectCommand was to use a store procedure and pass parameter options via Session variables to return dynamic record sets.
|
|
|
|
|
Hi,
does anybody know if it is possible to export an image from sql 2005 to excel?
Thanks,
T.
|
|
|
|
|
Both Chuck Norris and JSOP know
Treat them as two separate tasks;
1) fetch an image from SQL Server
2) export data to Excel[^]
I are troll
|
|
|
|