|
hey guys
this is my first function in vb.net and SQL
Public Function SelectAllParts() As DataTable<br />
Dim dtPart As New SQLServer, dtPartItems As New DataTable, PartSQL As String<br />
PartSQL = "select * from Part"<br />
dtPart.SelectCommand.CommandText = PartSQL<br />
dtPart.Fill(dtPartItems)<br />
SelectAllParts = dtPartItems<br />
End Function<br />
but i Got this Error:
i have made a succesfull connection to an
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
----
any clue for that???
note that the connection test test is succeded
Regards
Ramy
|
|
|
|
|
Hi,
This is a security feature. As specified in the error you cannot connect to a remote server until such connections are enabled in the settings.
Look at the following link
http://support.microsoft.com/kb/914277[^]
Thanks !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hey
I took a look at this site
and now all services are running normally ( as mentionned in the site)
but i kept on facing this problem
note that ZoneAlarm(Firewall)and windows Firewall are turned off
Regards
Ramy
|
|
|
|
|
Ramy,
your function doesnt show anything about defining the connection string.
This will contain the server name, username, password, etc.
Create an SqlConnection object, pass in a connection string.
<br />
Dim cnn as New SqlConnection()<br />
cnn.ConnectionString = "Server=myserver;Database=mydatabase;User ID=myUsername; Password=myPassword;Trusted_Connection=False"<br />
Then when you create sql commands, you can pass this object in.
<br />
dim cmd as new SqlCommand("SELECT * FROM Table1;", cnn)<br />
dim adapter as new SqlDataAdapter(cmd)<br />
dim result as new Datatable()<br />
adapter.Fill (result)<br />
Hope this helps
Mark
|
|
|
|
|
when i pass parameter/ write new sql statement at run time through vb , the crystal report is not getting refreshed unless I press the refresh button on the screen printed report.
the following code gives error also
With CrystalReport1
.ReportFileName = App.Path & "\Report1.rpt"
.SelectionFormula = S ' s is a parameter
.Action = 1
End With
|
|
|
|
|
I found a user control 'generic datagrid'. i would like to use it get a calender control in one of the grid columns. how can i use it? please help
|
|
|
|
|
Sorry to make another post, but in addition to my last post, is there a way to adjust the volume for either a Sound Recording/Media Player control? Or is there a way to adjust the Windows volume?
|
|
|
|
|
UltraCoder wrote: is there a way to adjust the volume for either a Sound Recording/Media Player control?
With the windows media player control use
Player.settings.volume = IntegerValue
Have a look at the Windows Media Player SDK Technology Page[^] and download some documentation. It'll come in useful, believe me.
|
|
|
|
|
Thanks for the help and link!
|
|
|
|
|
Hi guys,
I need some help regarding windows GDI. I need your help on some errors.
1. webform1.aspx has one button
2. user press the button
3. the pic with the gdi lines will be shown(Ive create a memorystream to store the image)
4. the webform1.aspx button will b gone
Anyway where i can retain the button at webform1.aspx? Is it anyway where i can allocate a space in the webpage to display the form? OR can i use javascript to open a window where i can show the image with the GDI lines?
Tks for helping =)
|
|
|
|
|
Hey,
I just read a previous post that said something about a Sound Recording control (see here).
Anyway, I was just wondering if what that control is called in Vb.Net 2005? Does anyone know?
And, how do you get a Media Player control without the controls (play, stop etc.) at the bottom? Like the one used in Coding 4 Fun's "Non Destructive Media Edits" article? (Sorry, Coding 4 Fun took that article down, so I cannot provide a link).
Thank you!
-- modified at 0:13 Sunday 5th November, 2006
|
|
|
|
|
UltraCoder wrote: how do you get a Media Player control without the controls (play, stop etc.) at the bottom?
Add a media player control to your toolbox (as shown here[^]). Drag & drop the media player control to your form and set the uiMode property to none.
|
|
|
|
|
|
Can anyone help me out, I want to make it so that when my application loads, it will display a form that says 'This is not freeware' and then has the options of 'exit'. 'register' 'try' Ive done the forms, but how can i code it so that it will 'lock' the user out after the 30 day trial period?
Many thanks
-- modified at 21:13 Saturday 4th November, 2006
|
|
|
|
|
|
Thanks for the help I can now carry on the long road of VB 2005.. whew
|
|
|
|
|
How can I use a VB 2005 app to send keystrokes or bits of information such as a cheat.
like this:
1. I Press button on form (when my game is running)
2. The application then sends a cheat code (godmode, ect)
3. the cheat happens ingame
in other words instead of typing the cheats in the console of the game, i just press a button on my app and it does it automaticcaly. (instead of doing the 'trainer way' and messing with the games memory address (wich doesnt always work))
... sounds pretty hard, sorry to bother you with this.
|
|
|
|
|
But that would be cheating......
anyway try building a console app that waits for the particular key stroke.
then used the Sendkeys() function in VB.
|
|
|
|
|
Um... sorry to burst your bubble.. but thats is the point, to 'cheat'
I kinda know how to use the sendkey function but can someone give me an example of sending it to the game?
|
|
|
|
|
hi,
how can i add a genericdatagrid control to my vb2005 project.please help?
i saved the .dll and added. but it is showing invalidoperationexception
An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.
please help
|
|
|
|
|
Hi,
A)i want to display a datetime picker one one column of the datagrid, how can i do it?
|
|
|
|
|
In vb 6.0, Using mscomm control how to make a call to a mobile,or how to sms to a mobile.I need the source code for the above question,
plz. be past
|
|
|
|
|
How can communicate between two WeifenLuo form within an Application??
Thankz in advance
ram
|
|
|
|
|
|
i am signing the pdf file with code projects example but i am trying to change the signature image "valid,unknown,unvalid,expired etc" how can i change the default icons"
AJAY KUMAR
ANIMON SOFTWARE SOLUSTION
|
|
|
|