|
Hi
I have a nice website builded in Visual Studio 2005 in which i use SqlExpress as a database provider , and the whole thing works fine but i wan't to change the database Provider to SqlServer, so i made a connection with my SqlServer 2005 provider and used one of the sample tables of AdventureWorks that comes as a sample to compare the syntac of a select statements with the statements used in my code, and noticed a difference in the syntac:
//SqlServer
Select Statement:
SELECT AddressID, AddressLine1, AddressLine2, City, StateProvinceID, PostalCode, rowguid, ModifiedDate FROM Person.Address
//SqlExpress Select Statement
SELECT [transactionID], [creationDateTime], [advertiserID], [pathBanner], [endDateTime], [Skype], [redirectUrl], [POS] FROM [Banner]
As you can see the express version uses [ ] and the SqlServer version does not,and the question is if i have to change the select/insert and update statements in my code if i change the database provider in my webConfig file or that i can leave it the way it is.
With friendly greetings,
Eric Goedhart
"I love the sound of Servers in the Morning!"
|
|
|
|
|
You would need to use [] if you had spaces in your field names, e.g., [transaction ID]. But if you don't it doesn't matter. I guess SQL Express is just being more idiot-proof.
Kevin
|
|
|
|
|
Thanks Kevin
With friendly greetings,
Eric Goedhart
"I love the sound of Servers in the Morning!"
|
|
|
|
|
Express uses TSQL just like all versions of SQL Server 2005.
When was the last time you poured some wine for you and your sweetie and went out on the front porch to watch the geometry frolic on the lake?--Rebecca M. Riordan, Designing Effective Database Systems
|
|
|
|
|
Hi
I have a vb.net web user control. In the control I have created a gridview. I want to add a button to the control which will simply print the contents of the gridview when clicked.
Any ideas?
steve
|
|
|
|
|
Hello All,
I am using CDOSYS in my Email Marketing Web Application. Given below is the code that i use to send an email.. and it works, I am not able to detect if the file has bounced back. I am working on the Delivery Report and this is my first step towards it. I know there are lot of components out there that can manage all this for me. but i believe it is possible within the features offered by CDOSYS. The following link seems explaining it.
http://support.microsoft.com/?scid=kb;en-us;302839&spid=6384&sid=67
The code i used.
Function SendTestMails(ByVal strHTML As String, ByVal strToEmailID As String) As Boolean
Dim dtMember As DataTable
Dim strFromMailId, strSMTPserver, strSMTPusername, strSMTPpassword, strSMTPport As String
Try
dtMember = pi_obj_Member.GetMembers(2)
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try
If dtMember.Rows.Count > 0 Then
strFromMailId = "me@company.com"
strSMTPserver = "NNN.NN.NN.NN"
strSMTPusername = "MyUserName"
strSMTPpassword = "MyPassword"
strSMTPport = "25"
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM
Dim objMessage As Object
objMessage = CreateObject("CDO.Message")
objMessage.Subject = "This is a test message"
objMessage.From = strFromMailId
objMessage.To = strToEmailID
objMessage.HTMLBody = CStr("" & strHTML)
'==This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPserver
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = strSMTPusername
'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = strSMTPpassword
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = strSMTPport '25
'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
objMessage.Configuration.fields("urn:schemas:mailheader:disposition-notification-to") = "me@company.com"
objMessage.Configuration.fields("urn:schemas:mailheader:return-receipt-to") = "me@company.com"
objMessage.Configuration.Fields.Update()
'==End remote SMTP server configuration section==
Try
objMessage.Send()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try
objMessage = Nothing
End If
End Function
Alpha/Bravo\Charlie
|
|
|
|
|
I have a TableRow
TableRow tr = new TableRow();
I need to specify this row as a gradient from light gray to dark gray.
Does any know the code to do that? server-side code only please.
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
nevermind. you create a filter style
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Isn't that an IE-Specific thing?
I generally use a photoshopped image and stretch it to get nice gradients.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hello,
i have Sql Script file. what i want when i click on button then query under sql script file execute automatically and Table must be created on specified location.
is it possible?
thanx
Any Suggestion.
|
|
|
|
|
Yes
only two letters away from being an asset
|
|
|
|
|
could u tell me how can i do it.
plz thanx
|
|
|
|
|
Oh, I thought you just wanted to know if it was possible. That's a different question then.;P
only two letters away from being an asset
|
|
|
|
|
just send it through as text or use SQLDMO
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
ok
i will send it as a text.but how it will run. or execute.
and where i will defined the location for creating the tables.
thanx
|
|
|
|
|
Hi guys,
I have an interesting scenario. I have a web application created with asp.net 2005. There will be more users who will be using my web application. User's can use the login page to log in to the application and use sign out to logoff the application. My question is :- if for example a user from a machine 1 with an ID "Shankar" has signed into the application by providing the correct credentials and the same user is signing into the application with the same credentials, but this time from a differant machine. How should i prevent this from happening. Please help me out of this problem.
Regards
Shankar
|
|
|
|
|
|
check the ip address when signing in
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
I don't think the IP is the way to go. (due to NAT, etc..) The IP is unreliable.
|
|
|
|
|
yes, and due to the architecture of the web. Knowing the actual computer ID is unreliable also.
But you can still trace the IP to the origination IP. It all depends on how much effort you want to use.( there are tons of utilities that can trace this) But, using whois you can trace down the ISP and they usually use the same patterns for IP's.
I was on a spam rampage and I can trace anyone back to thier orignal IP that the email was sent from. Even if its sent within IP hider types. And if this tells me thier ip location, so will the requesting machine.
all you really need is the ISP server name and a few other bits which are inside the request header. Everything is traceable. There maybe hurdle, but tons of sites in the UK tell you how to get past anyone of them.
IP or a mac address is your best bet. But, last time i looked at a header the mac address wasn't there. And due to security you wont be able to get it, unless you create an active x control to run on your page. Much like AJAX.
Nick
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Shankar
We had the same sort of functionality in our application and we are storing ip, flag , domain name and checking with or conditions. If any conditions return true value we display message to user. But I am not sure how flexible you are for changing your application design,
Amit
|
|
|
|
|
Hi,
We are using MySql Connector 1.0.7, .Net Framework 1.1 and MySql 4.0.12. We are getting following error very frequently.
To resolve this error we have also changed our hosting server which is of .Net Framework 2. So error is occurring for both Framework 1.1 and 2.
But still we are stucked with it.
///////////////////////////////////////////////////////////////////
Server Error in '/' Application.
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
Stack Trace:
[SocketException (0x2749): A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied]
System.Net.Sockets.Socket.Shutdown(SocketShutdown how) +1005764
MySql.Data.Common.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 count) +68
System.IO.BufferedStream.ReadByte() +103
MySql.Data.MySqlClient.PacketReader.ReadHeader() +16
MySql.Data.MySqlClient.PacketReader.OpenPacket() +119
MySql.Data.MySqlClient.NativeDriver.Open() +653
MySql.Data.MySqlClient.MySqlConnection.Open() +142
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
///////////////////////////////////////////////////////////////////
Is there anyone who can get me out of this problem ?
Thanks in advance.
|
|
|
|
|
Hi Friends,
I have a ASP.NET application that stores session information in Shared class, now everytime a new user comes the old users session information is written by the new user information. I understand thats how Shared variables work, but what app domains? can't we use app domains to isolate each user.
Any hints will be highly appreciated......
ThX in advance
Amit
|
|
|
|
|
AppDomains has no bearing on your problem what so ever.
The Session object has a collection that you can use to store user specific data. Example:
Session["userid"] = 42;<br />
<br />
int userId = (int)Session["userid"];
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
you can use either of the
Session Variables
or
Coockie
Hope this works
Nitin...
|
|
|
|